GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 74.2% 330 / 0 / 445
Functions: 75.6% 99 / 0 / 131
Branches: 44.8% 174 / 0 / 388

src/model/CurveQuintLinear.cpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #include "CurveQuintLinear.hpp"
7 #include "CurveQuintLinear_Impl.hpp"
8
9 #include <utilities/idd/IddFactory.hxx>
10 #include <utilities/idd/IddEnums.hxx>
11 #include <utilities/idd/OS_Curve_QuintLinear_FieldEnums.hxx>
12
13 #include "../utilities/units/Unit.hpp"
14
15 #include "../utilities/core/Assert.hpp"
16
17 namespace openstudio {
18 namespace model {
19
20 namespace detail {
21
22 33 CurveQuintLinear_Impl::CurveQuintLinear_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
23 33 : Curve_Impl(idfObject, model, keepHandle) {
24
4/6
✓ Branch 1 taken 33 times.
✓ Branch 4 taken 33 times.
✓ Branch 7 taken 33 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 33 times.
✗ Branch 13 not taken.
33 OS_ASSERT(idfObject.iddObject().type() == CurveQuintLinear::iddObjectType());
25 33 }
26
27 9 CurveQuintLinear_Impl::CurveQuintLinear_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
28 9 : Curve_Impl(other, model, keepHandle) {
29
4/6
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 9 times.
✗ Branch 13 not taken.
9 OS_ASSERT(other.iddObject().type() == CurveQuintLinear::iddObjectType());
30 9 }
31
32 13 CurveQuintLinear_Impl::CurveQuintLinear_Impl(const CurveQuintLinear_Impl& other, Model_Impl* model, bool keepHandle)
33 13 : Curve_Impl(other, model, keepHandle) {}
34
35 ✗ const std::vector<std::string>& CurveQuintLinear_Impl::outputVariableNames() const {
36 ✗ static std::vector<std::string> result;
37 ✗ if (result.empty()) {
38 }
39 ✗ return result;
40 }
41
42 ✗ IddObjectType CurveQuintLinear_Impl::iddObjectType() const {
43 ✗ return CurveQuintLinear::iddObjectType();
44 }
45
46 ✗ int CurveQuintLinear_Impl::numVariables() const {
47 ✗ return 5;
48 }
49
50 1 double CurveQuintLinear_Impl::evaluate(const std::vector<double>& independentVariables) const {
51
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 OS_ASSERT(independentVariables.size() == 5u);
52
53 1 double v = independentVariables[0];
54
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (v < minimumValueofv()) {
55 ✗ LOG(Warn, "Supplied x is belov the minimumValueofv, resetting it.");
56 ✗ v = minimumValueofv();
57 }
58
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (v > maximumValueofv()) {
59 ✗ LOG(Warn, "Supplied v is above the maximumValueofv, resetting it.");
60 ✗ v = maximumValueofv();
61 }
62
63 1 double w = independentVariables[1];
64
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (w < minimumValueofw()) {
65 ✗ LOG(Warn, "Supplied x is below the minimumValueofw, resetting it.");
66 ✗ w = minimumValueofw();
67 }
68
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (w > maximumValueofw()) {
69 ✗ LOG(Warn, "Supplied w is above the maximumValueofw, resetting it.");
70 ✗ w = maximumValueofw();
71 }
72
73 1 double x = independentVariables[2];
74
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (x < minimumValueofx()) {
75 ✗ LOG(Warn, "Supplied x is below the minimumValueofx, resetting it.");
76 ✗ x = minimumValueofx();
77 }
78
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (x > maximumValueofx()) {
79 ✗ LOG(Warn, "Supplied x is above the maximumValueofx, resetting it.");
80 ✗ x = maximumValueofx();
81 }
82
83 1 double y = independentVariables[3];
84
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (y < minimumValueofy()) {
85 ✗ LOG(Warn, "Supplied y is below the minimumValueofy, resetting it.");
86 ✗ y = minimumValueofy();
87 }
88
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (y > maximumValueofy()) {
89 ✗ LOG(Warn, "Supplied y is above the maximumValueofy, resetting it.");
90 ✗ y = maximumValueofy();
91 }
92
93 1 double z = independentVariables[4];
94
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (z < minimumValueofz()) {
95 ✗ LOG(Warn, "Supplied z is below the minimumValueofz, resetting it.");
96 ✗ z = minimumValueofz();
97 }
98
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (z > maximumValueofz()) {
99 ✗ LOG(Warn, "Supplied z is above the maximumValueofz, resetting it.");
100 ✗ z = maximumValueofz();
101 }
102
103 // C1 + C2*v + C3*w + C4*x + C5*y + C6*z
104 1 double result = coefficient1Constant();
105 1 result += coefficient2v() * v;
106 1 result += coefficient3w() * w;
107 1 result += coefficient4x() * x;
108 1 result += coefficient5y() * y;
109 1 result += coefficient6z() * z;
110
111
2/3
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
2 if (boost::optional<double> _minVal = minimumCurveOutput()) {
112 ✗ double minVal = _minVal.get();
113 ✗ if (result < minVal) {
114 ✗ LOG(Warn, "Calculated curve output is below minimumCurveOutput, resetting it.");
115 ✗ result = minVal;
116 }
117 }
118
119
2/3
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
2 if (boost::optional<double> _maxVal = maximumCurveOutput()) {
120 ✗ double maxVal = _maxVal.get();
121 ✗ if (result > maxVal) {
122 ✗ LOG(Warn, "Calculated curve output is above maximumCurveOutput, resetting it.");
123 ✗ result = maxVal;
124 }
125 }
126
127 1 return result;
128 }
129
130 14 double CurveQuintLinear_Impl::coefficient1Constant() const {
131
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::Coefficient1Constant, true);
132
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
133
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
134 }
135
136 14 double CurveQuintLinear_Impl::coefficient2v() const {
137
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::Coefficient2v, true);
138
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
139
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
140 }
141
142 14 double CurveQuintLinear_Impl::coefficient3w() const {
143
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::Coefficient3w, true);
144
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
145
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
146 }
147
148 14 double CurveQuintLinear_Impl::coefficient4x() const {
149
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::Coefficient4x, true);
150
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
151
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
152 }
153
154 14 double CurveQuintLinear_Impl::coefficient5y() const {
155
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::Coefficient5y, true);
156
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
157
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
158 }
159
160 14 double CurveQuintLinear_Impl::coefficient6z() const {
161
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::Coefficient6z, true);
162
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
163
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
164 }
165
166 13 double CurveQuintLinear_Impl::minimumValueofv() const {
167
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MinimumValueofv, true);
168
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
169
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
170 }
171
172 13 double CurveQuintLinear_Impl::maximumValueofv() const {
173
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MaximumValueofv, true);
174
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
175
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
176 }
177
178 13 double CurveQuintLinear_Impl::minimumValueofw() const {
179
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MinimumValueofw, true);
180
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
181
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
182 }
183
184 13 double CurveQuintLinear_Impl::maximumValueofw() const {
185
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MaximumValueofw, true);
186
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
187
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
188 }
189
190 13 double CurveQuintLinear_Impl::minimumValueofx() const {
191
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MinimumValueofx, true);
192
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
193
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
194 }
195
196 13 double CurveQuintLinear_Impl::maximumValueofx() const {
197
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MaximumValueofx, true);
198
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
199
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
200 }
201
202 13 double CurveQuintLinear_Impl::minimumValueofy() const {
203
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MinimumValueofy, true);
204
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
205
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
206 }
207
208 13 double CurveQuintLinear_Impl::maximumValueofy() const {
209
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MaximumValueofy, true);
210
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
211
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
212 }
213
214 13 double CurveQuintLinear_Impl::minimumValueofz() const {
215
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MinimumValueofz, true);
216
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
217
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
218 }
219
220 13 double CurveQuintLinear_Impl::maximumValueofz() const {
221
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<double> value = getDouble(OS_Curve_QuintLinearFields::MaximumValueofz, true);
222
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
223
1/1
✓ Branch 1 taken 13 times.
26 return value.get();
224 }
225
226 15 boost::optional<double> CurveQuintLinear_Impl::minimumCurveOutput() const {
227 15 return getDouble(OS_Curve_QuintLinearFields::MinimumCurveOutput, true);
228 }
229
230 15 boost::optional<double> CurveQuintLinear_Impl::maximumCurveOutput() const {
231 15 return getDouble(OS_Curve_QuintLinearFields::MaximumCurveOutput, true);
232 }
233
234 13 std::string CurveQuintLinear_Impl::inputUnitTypeforv() const {
235
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<std::string> value = getString(OS_Curve_QuintLinearFields::InputUnitTypeforv, true);
236
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
237
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
26 return value.get();
238 13 }
239
240 ✗ bool CurveQuintLinear_Impl::isInputUnitTypeforvDefaulted() const {
241 ✗ return isEmpty(OS_Curve_QuintLinearFields::InputUnitTypeforv);
242 }
243
244 13 std::string CurveQuintLinear_Impl::inputUnitTypeforw() const {
245
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<std::string> value = getString(OS_Curve_QuintLinearFields::InputUnitTypeforw, true);
246
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
247
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
26 return value.get();
248 13 }
249
250 ✗ bool CurveQuintLinear_Impl::isInputUnitTypeforwDefaulted() const {
251 ✗ return isEmpty(OS_Curve_QuintLinearFields::InputUnitTypeforw);
252 }
253
254 13 std::string CurveQuintLinear_Impl::inputUnitTypeforx() const {
255
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<std::string> value = getString(OS_Curve_QuintLinearFields::InputUnitTypeforx, true);
256
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
257
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
26 return value.get();
258 13 }
259
260 ✗ bool CurveQuintLinear_Impl::isInputUnitTypeforxDefaulted() const {
261 ✗ return isEmpty(OS_Curve_QuintLinearFields::InputUnitTypeforx);
262 }
263
264 13 std::string CurveQuintLinear_Impl::inputUnitTypefory() const {
265
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<std::string> value = getString(OS_Curve_QuintLinearFields::InputUnitTypefory, true);
266
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
267
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
26 return value.get();
268 13 }
269
270 ✗ bool CurveQuintLinear_Impl::isInputUnitTypeforyDefaulted() const {
271 ✗ return isEmpty(OS_Curve_QuintLinearFields::InputUnitTypefory);
272 }
273
274 13 std::string CurveQuintLinear_Impl::inputUnitTypeforz() const {
275
1/1
✓ Branch 1 taken 13 times.
13 boost::optional<std::string> value = getString(OS_Curve_QuintLinearFields::InputUnitTypeforz, true);
276
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
13 OS_ASSERT(value);
277
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
26 return value.get();
278 13 }
279
280 ✗ bool CurveQuintLinear_Impl::isInputUnitTypeforzDefaulted() const {
281 ✗ return isEmpty(OS_Curve_QuintLinearFields::InputUnitTypeforz);
282 }
283
284 47 bool CurveQuintLinear_Impl::setCoefficient1Constant(double coefficient1Constant) {
285 47 bool result = setDouble(OS_Curve_QuintLinearFields::Coefficient1Constant, coefficient1Constant);
286
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
47 OS_ASSERT(result);
287 47 return result;
288 }
289
290 47 bool CurveQuintLinear_Impl::setCoefficient2v(double coefficient2v) {
291 47 bool result = setDouble(OS_Curve_QuintLinearFields::Coefficient2v, coefficient2v);
292
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
47 OS_ASSERT(result);
293 47 return result;
294 }
295
296 47 bool CurveQuintLinear_Impl::setCoefficient3w(double coefficient3w) {
297 47 bool result = setDouble(OS_Curve_QuintLinearFields::Coefficient3w, coefficient3w);
298
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
47 OS_ASSERT(result);
299 47 return result;
300 }
301
302 47 bool CurveQuintLinear_Impl::setCoefficient4x(double coefficient4x) {
303 47 bool result = setDouble(OS_Curve_QuintLinearFields::Coefficient4x, coefficient4x);
304
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
47 OS_ASSERT(result);
305 47 return result;
306 }
307
308 47 bool CurveQuintLinear_Impl::setCoefficient5y(double coefficient5y) {
309 47 bool result = setDouble(OS_Curve_QuintLinearFields::Coefficient5y, coefficient5y);
310
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
47 OS_ASSERT(result);
311 47 return result;
312 }
313
314 47 bool CurveQuintLinear_Impl::setCoefficient6z(double coefficient6z) {
315 47 bool result = setDouble(OS_Curve_QuintLinearFields::Coefficient6z, coefficient6z);
316
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 47 times.
47 OS_ASSERT(result);
317 47 return result;
318 }
319
320 28 bool CurveQuintLinear_Impl::setMinimumValueofv(double minimumValueofv) {
321 28 bool result = setDouble(OS_Curve_QuintLinearFields::MinimumValueofv, minimumValueofv);
322
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 28 times.
28 OS_ASSERT(result);
323 28 return result;
324 }
325
326 28 bool CurveQuintLinear_Impl::setMaximumValueofv(double maximumValueofv) {
327 28 bool result = setDouble(OS_Curve_QuintLinearFields::MaximumValueofv, maximumValueofv);
328
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 28 times.
28 OS_ASSERT(result);
329 28 return result;
330 }
331
332 28 bool CurveQuintLinear_Impl::setMinimumValueofw(double minimumValueofw) {
333 28 bool result = setDouble(OS_Curve_QuintLinearFields::MinimumValueofw, minimumValueofw);
334
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 28 times.
28 OS_ASSERT(result);
335 28 return result;
336 }
337
338 28 bool CurveQuintLinear_Impl::setMaximumValueofw(double maximumValueofw) {
339 28 bool result = setDouble(OS_Curve_QuintLinearFields::MaximumValueofw, maximumValueofw);
340
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 28 times.
28 OS_ASSERT(result);
341 28 return result;
342 }
343
344 28 bool CurveQuintLinear_Impl::setMinimumValueofx(double minimumValueofx) {
345 28 bool result = setDouble(OS_Curve_QuintLinearFields::MinimumValueofx, minimumValueofx);
346
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 28 times.
28 OS_ASSERT(result);
347 28 return result;
348 }
349
350 28 bool CurveQuintLinear_Impl::setMaximumValueofx(double maximumValueofx) {
351 28 bool result = setDouble(OS_Curve_QuintLinearFields::MaximumValueofx, maximumValueofx);
352
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 28 times.
28 OS_ASSERT(result);
353 28 return result;
354 }
355
356 29 bool CurveQuintLinear_Impl::setMinimumValueofy(double minimumValueofy) {
357 29 bool result = setDouble(OS_Curve_QuintLinearFields::MinimumValueofy, minimumValueofy);
358
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 29 times.
29 OS_ASSERT(result);
359 29 return result;
360 }
361
362 29 bool CurveQuintLinear_Impl::setMaximumValueofy(double maximumValueofy) {
363 29 bool result = setDouble(OS_Curve_QuintLinearFields::MaximumValueofy, maximumValueofy);
364
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 29 times.
29 OS_ASSERT(result);
365 29 return result;
366 }
367
368 27 bool CurveQuintLinear_Impl::setMinimumValueofz(double minimumValueofz) {
369 27 bool result = setDouble(OS_Curve_QuintLinearFields::MinimumValueofz, minimumValueofz);
370
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 27 times.
27 OS_ASSERT(result);
371 27 return result;
372 }
373
374 27 bool CurveQuintLinear_Impl::setMaximumValueofz(double maximumValueofz) {
375 27 bool result = setDouble(OS_Curve_QuintLinearFields::MaximumValueofz, maximumValueofz);
376
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 27 times.
27 OS_ASSERT(result);
377 27 return result;
378 }
379
380 4 bool CurveQuintLinear_Impl::setMinimumCurveOutput(double minimumCurveOutput) {
381 4 bool result = setDouble(OS_Curve_QuintLinearFields::MinimumCurveOutput, minimumCurveOutput);
382
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
4 OS_ASSERT(result);
383 4 return result;
384 }
385
386 ✗ void CurveQuintLinear_Impl::resetMinimumCurveOutput() {
387 ✗ bool result = setString(OS_Curve_QuintLinearFields::MinimumCurveOutput, "");
388 ✗ OS_ASSERT(result);
389 ✗ }
390
391 4 bool CurveQuintLinear_Impl::setMaximumCurveOutput(double maximumCurveOutput) {
392 4 bool result = setDouble(OS_Curve_QuintLinearFields::MaximumCurveOutput, maximumCurveOutput);
393
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
4 OS_ASSERT(result);
394 4 return result;
395 }
396
397 ✗ void CurveQuintLinear_Impl::resetMaximumCurveOutput() {
398 ✗ bool result = setString(OS_Curve_QuintLinearFields::MaximumCurveOutput, "");
399 ✗ OS_ASSERT(result);
400 ✗ }
401
402 5 bool CurveQuintLinear_Impl::setInputUnitTypeforv(const std::string& inputUnitTypeforv) {
403 5 bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypeforv, inputUnitTypeforv);
404 5 return result;
405 }
406
407 ✗ void CurveQuintLinear_Impl::resetInputUnitTypeforv() {
408 ✗ bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypeforv, "");
409 ✗ OS_ASSERT(result);
410 ✗ }
411
412 5 bool CurveQuintLinear_Impl::setInputUnitTypeforw(const std::string& inputUnitTypeforw) {
413 5 bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypeforw, inputUnitTypeforw);
414 5 return result;
415 }
416
417 ✗ void CurveQuintLinear_Impl::resetInputUnitTypeforw() {
418 ✗ bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypeforw, "");
419 ✗ OS_ASSERT(result);
420 ✗ }
421
422 5 bool CurveQuintLinear_Impl::setInputUnitTypeforx(const std::string& inputUnitTypeforx) {
423 5 bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypeforx, inputUnitTypeforx);
424 5 return result;
425 }
426
427 ✗ void CurveQuintLinear_Impl::resetInputUnitTypeforx() {
428 ✗ bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypeforx, "");
429 ✗ OS_ASSERT(result);
430 ✗ }
431
432 5 bool CurveQuintLinear_Impl::setInputUnitTypefory(const std::string& inputUnitTypefory) {
433 5 bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypefory, inputUnitTypefory);
434 5 return result;
435 }
436
437 ✗ void CurveQuintLinear_Impl::resetInputUnitTypefory() {
438 ✗ bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypefory, "");
439 ✗ OS_ASSERT(result);
440 ✗ }
441
442 5 bool CurveQuintLinear_Impl::setInputUnitTypeforz(const std::string& inputUnitTypeforz) {
443 5 bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypeforz, inputUnitTypeforz);
444 5 return result;
445 }
446
447 ✗ void CurveQuintLinear_Impl::resetInputUnitTypeforz() {
448 ✗ bool result = setString(OS_Curve_QuintLinearFields::InputUnitTypeforz, "");
449 ✗ OS_ASSERT(result);
450 ✗ }
451
452 } // namespace detail
453
454 24 CurveQuintLinear::CurveQuintLinear(const Model& model) : Curve(CurveQuintLinear::iddObjectType(), model) {
455
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 24 times.
✗ Branch 5 not taken.
24 OS_ASSERT(getImpl<detail::CurveQuintLinear_Impl>());
456
457
1/1
✓ Branch 1 taken 24 times.
24 setCoefficient1Constant(0.0);
458
1/1
✓ Branch 1 taken 24 times.
24 setCoefficient2v(1.0);
459
1/1
✓ Branch 1 taken 24 times.
24 setCoefficient3w(1.0);
460
1/1
✓ Branch 1 taken 24 times.
24 setCoefficient4x(1.0);
461
1/1
✓ Branch 1 taken 24 times.
24 setCoefficient5y(1.0);
462
1/1
✓ Branch 1 taken 24 times.
24 setCoefficient6z(1.0);
463
1/1
✓ Branch 1 taken 24 times.
24 setMinimumValueofv(-100.0);
464
1/1
✓ Branch 1 taken 24 times.
24 setMaximumValueofv(100.0);
465
1/1
✓ Branch 1 taken 24 times.
24 setMinimumValueofw(-100.0);
466
1/1
✓ Branch 1 taken 24 times.
24 setMaximumValueofw(100.0);
467
1/1
✓ Branch 1 taken 24 times.
24 setMinimumValueofx(-100.0);
468
1/1
✓ Branch 1 taken 24 times.
24 setMaximumValueofx(100.0);
469
1/1
✓ Branch 1 taken 24 times.
24 setMinimumValueofy(0.0);
470
1/1
✓ Branch 1 taken 24 times.
24 setMaximumValueofy(100.0);
471
1/1
✓ Branch 1 taken 24 times.
24 setMinimumValueofz(0.0);
472
1/1
✓ Branch 1 taken 24 times.
24 setMaximumValueofz(100.0);
473 24 }
474
475 7795 IddObjectType CurveQuintLinear::iddObjectType() {
476
1/1
✓ Branch 1 taken 7795 times.
7795 return {IddObjectType::OS_Curve_QuintLinear};
477 }
478
479 ✗ std::vector<std::string> CurveQuintLinear::inputUnitTypeforvValues() {
480 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuintLinearFields::InputUnitTypeforv);
481 }
482
483 ✗ std::vector<std::string> CurveQuintLinear::inputUnitTypeforwValues() {
484 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuintLinearFields::InputUnitTypeforw);
485 }
486
487 ✗ std::vector<std::string> CurveQuintLinear::inputUnitTypeforxValues() {
488 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuintLinearFields::InputUnitTypeforx);
489 }
490
491 ✗ std::vector<std::string> CurveQuintLinear::inputUnitTypeforyValues() {
492 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuintLinearFields::InputUnitTypefory);
493 }
494
495 ✗ std::vector<std::string> CurveQuintLinear::inputUnitTypeforzValues() {
496 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuintLinearFields::InputUnitTypeforz);
497 }
498
499 13 double CurveQuintLinear::coefficient1Constant() const {
500
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->coefficient1Constant();
501 }
502
503 13 double CurveQuintLinear::coefficient2v() const {
504
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->coefficient2v();
505 }
506
507 13 double CurveQuintLinear::coefficient3w() const {
508
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->coefficient3w();
509 }
510
511 13 double CurveQuintLinear::coefficient4x() const {
512
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->coefficient4x();
513 }
514
515 13 double CurveQuintLinear::coefficient5y() const {
516
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->coefficient5y();
517 }
518
519 13 double CurveQuintLinear::coefficient6z() const {
520
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->coefficient6z();
521 }
522
523 12 double CurveQuintLinear::minimumValueofv() const {
524
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->minimumValueofv();
525 }
526
527 12 double CurveQuintLinear::maximumValueofv() const {
528
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->maximumValueofv();
529 }
530
531 12 double CurveQuintLinear::minimumValueofw() const {
532
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->minimumValueofw();
533 }
534
535 12 double CurveQuintLinear::maximumValueofw() const {
536
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->maximumValueofw();
537 }
538
539 12 double CurveQuintLinear::minimumValueofx() const {
540
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->minimumValueofx();
541 }
542
543 12 double CurveQuintLinear::maximumValueofx() const {
544
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->maximumValueofx();
545 }
546
547 12 double CurveQuintLinear::minimumValueofy() const {
548
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->minimumValueofy();
549 }
550
551 12 double CurveQuintLinear::maximumValueofy() const {
552
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->maximumValueofy();
553 }
554
555 12 double CurveQuintLinear::minimumValueofz() const {
556
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->minimumValueofz();
557 }
558
559 12 double CurveQuintLinear::maximumValueofz() const {
560
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CurveQuintLinear_Impl>()->maximumValueofz();
561 }
562
563 14 boost::optional<double> CurveQuintLinear::minimumCurveOutput() const {
564
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CurveQuintLinear_Impl>()->minimumCurveOutput();
565 }
566
567 14 boost::optional<double> CurveQuintLinear::maximumCurveOutput() const {
568
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CurveQuintLinear_Impl>()->maximumCurveOutput();
569 }
570
571 13 std::string CurveQuintLinear::inputUnitTypeforv() const {
572
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->inputUnitTypeforv();
573 }
574
575 ✗ bool CurveQuintLinear::isInputUnitTypeforvDefaulted() const {
576 ✗ return getImpl<detail::CurveQuintLinear_Impl>()->isInputUnitTypeforvDefaulted();
577 }
578
579 13 std::string CurveQuintLinear::inputUnitTypeforw() const {
580
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->inputUnitTypeforw();
581 }
582
583 ✗ bool CurveQuintLinear::isInputUnitTypeforwDefaulted() const {
584 ✗ return getImpl<detail::CurveQuintLinear_Impl>()->isInputUnitTypeforwDefaulted();
585 }
586
587 13 std::string CurveQuintLinear::inputUnitTypeforx() const {
588
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->inputUnitTypeforx();
589 }
590
591 ✗ bool CurveQuintLinear::isInputUnitTypeforxDefaulted() const {
592 ✗ return getImpl<detail::CurveQuintLinear_Impl>()->isInputUnitTypeforxDefaulted();
593 }
594
595 13 std::string CurveQuintLinear::inputUnitTypefory() const {
596
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->inputUnitTypefory();
597 }
598
599 ✗ bool CurveQuintLinear::isInputUnitTypeforyDefaulted() const {
600 ✗ return getImpl<detail::CurveQuintLinear_Impl>()->isInputUnitTypeforyDefaulted();
601 }
602
603 13 std::string CurveQuintLinear::inputUnitTypeforz() const {
604
1/1
✓ Branch 3 taken 13 times.
13 return getImpl<detail::CurveQuintLinear_Impl>()->inputUnitTypeforz();
605 }
606
607 ✗ bool CurveQuintLinear::isInputUnitTypeforzDefaulted() const {
608 ✗ return getImpl<detail::CurveQuintLinear_Impl>()->isInputUnitTypeforzDefaulted();
609 }
610
611 47 bool CurveQuintLinear::setCoefficient1Constant(double coefficient1Constant) {
612
1/1
✓ Branch 3 taken 47 times.
47 return getImpl<detail::CurveQuintLinear_Impl>()->setCoefficient1Constant(coefficient1Constant);
613 }
614
615 47 bool CurveQuintLinear::setCoefficient2v(double coefficient2v) {
616
1/1
✓ Branch 3 taken 47 times.
47 return getImpl<detail::CurveQuintLinear_Impl>()->setCoefficient2v(coefficient2v);
617 }
618
619 47 bool CurveQuintLinear::setCoefficient3w(double coefficient3w) {
620
1/1
✓ Branch 3 taken 47 times.
47 return getImpl<detail::CurveQuintLinear_Impl>()->setCoefficient3w(coefficient3w);
621 }
622
623 47 bool CurveQuintLinear::setCoefficient4x(double coefficient4x) {
624
1/1
✓ Branch 3 taken 47 times.
47 return getImpl<detail::CurveQuintLinear_Impl>()->setCoefficient4x(coefficient4x);
625 }
626
627 47 bool CurveQuintLinear::setCoefficient5y(double coefficient5y) {
628
1/1
✓ Branch 3 taken 47 times.
47 return getImpl<detail::CurveQuintLinear_Impl>()->setCoefficient5y(coefficient5y);
629 }
630
631 47 bool CurveQuintLinear::setCoefficient6z(double coefficient6z) {
632
1/1
✓ Branch 3 taken 47 times.
47 return getImpl<detail::CurveQuintLinear_Impl>()->setCoefficient6z(coefficient6z);
633 }
634
635 28 bool CurveQuintLinear::setMinimumValueofv(double minimumValueofv) {
636
1/1
✓ Branch 3 taken 28 times.
28 return getImpl<detail::CurveQuintLinear_Impl>()->setMinimumValueofv(minimumValueofv);
637 }
638
639 28 bool CurveQuintLinear::setMaximumValueofv(double maximumValueofv) {
640
1/1
✓ Branch 3 taken 28 times.
28 return getImpl<detail::CurveQuintLinear_Impl>()->setMaximumValueofv(maximumValueofv);
641 }
642
643 28 bool CurveQuintLinear::setMinimumValueofw(double minimumValueofw) {
644
1/1
✓ Branch 3 taken 28 times.
28 return getImpl<detail::CurveQuintLinear_Impl>()->setMinimumValueofw(minimumValueofw);
645 }
646
647 28 bool CurveQuintLinear::setMaximumValueofw(double maximumValueofw) {
648
1/1
✓ Branch 3 taken 28 times.
28 return getImpl<detail::CurveQuintLinear_Impl>()->setMaximumValueofw(maximumValueofw);
649 }
650
651 28 bool CurveQuintLinear::setMinimumValueofx(double minimumValueofx) {
652
1/1
✓ Branch 3 taken 28 times.
28 return getImpl<detail::CurveQuintLinear_Impl>()->setMinimumValueofx(minimumValueofx);
653 }
654
655 28 bool CurveQuintLinear::setMaximumValueofx(double maximumValueofx) {
656
1/1
✓ Branch 3 taken 28 times.
28 return getImpl<detail::CurveQuintLinear_Impl>()->setMaximumValueofx(maximumValueofx);
657 }
658
659 29 bool CurveQuintLinear::setMinimumValueofy(double minimumValueofy) {
660
1/1
✓ Branch 3 taken 29 times.
29 return getImpl<detail::CurveQuintLinear_Impl>()->setMinimumValueofy(minimumValueofy);
661 }
662
663 29 bool CurveQuintLinear::setMaximumValueofy(double maximumValueofy) {
664
1/1
✓ Branch 3 taken 29 times.
29 return getImpl<detail::CurveQuintLinear_Impl>()->setMaximumValueofy(maximumValueofy);
665 }
666
667 27 bool CurveQuintLinear::setMinimumValueofz(double minimumValueofz) {
668
1/1
✓ Branch 3 taken 27 times.
27 return getImpl<detail::CurveQuintLinear_Impl>()->setMinimumValueofz(minimumValueofz);
669 }
670
671 27 bool CurveQuintLinear::setMaximumValueofz(double maximumValueofz) {
672
1/1
✓ Branch 3 taken 27 times.
27 return getImpl<detail::CurveQuintLinear_Impl>()->setMaximumValueofz(maximumValueofz);
673 }
674
675 4 bool CurveQuintLinear::setMinimumCurveOutput(double minimumCurveOutput) {
676
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuintLinear_Impl>()->setMinimumCurveOutput(minimumCurveOutput);
677 }
678
679 ✗ void CurveQuintLinear::resetMinimumCurveOutput() {
680 ✗ getImpl<detail::CurveQuintLinear_Impl>()->resetMinimumCurveOutput();
681 ✗ }
682
683 4 bool CurveQuintLinear::setMaximumCurveOutput(double maximumCurveOutput) {
684
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuintLinear_Impl>()->setMaximumCurveOutput(maximumCurveOutput);
685 }
686
687 ✗ void CurveQuintLinear::resetMaximumCurveOutput() {
688 ✗ getImpl<detail::CurveQuintLinear_Impl>()->resetMaximumCurveOutput();
689 ✗ }
690
691 5 bool CurveQuintLinear::setInputUnitTypeforv(const std::string& inputUnitTypeforv) {
692
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CurveQuintLinear_Impl>()->setInputUnitTypeforv(inputUnitTypeforv);
693 }
694
695 ✗ void CurveQuintLinear::resetInputUnitTypeforv() {
696 ✗ getImpl<detail::CurveQuintLinear_Impl>()->resetInputUnitTypeforv();
697 ✗ }
698
699 5 bool CurveQuintLinear::setInputUnitTypeforw(const std::string& inputUnitTypeforw) {
700
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CurveQuintLinear_Impl>()->setInputUnitTypeforw(inputUnitTypeforw);
701 }
702
703 ✗ void CurveQuintLinear::resetInputUnitTypeforw() {
704 ✗ getImpl<detail::CurveQuintLinear_Impl>()->resetInputUnitTypeforw();
705 ✗ }
706
707 5 bool CurveQuintLinear::setInputUnitTypeforx(const std::string& inputUnitTypeforx) {
708
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CurveQuintLinear_Impl>()->setInputUnitTypeforx(inputUnitTypeforx);
709 }
710
711 ✗ void CurveQuintLinear::resetInputUnitTypeforx() {
712 ✗ getImpl<detail::CurveQuintLinear_Impl>()->resetInputUnitTypeforx();
713 ✗ }
714
715 5 bool CurveQuintLinear::setInputUnitTypefory(const std::string& inputUnitTypefory) {
716
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CurveQuintLinear_Impl>()->setInputUnitTypefory(inputUnitTypefory);
717 }
718
719 ✗ void CurveQuintLinear::resetInputUnitTypefory() {
720 ✗ getImpl<detail::CurveQuintLinear_Impl>()->resetInputUnitTypefory();
721 ✗ }
722
723 5 bool CurveQuintLinear::setInputUnitTypeforz(const std::string& inputUnitTypeforz) {
724
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CurveQuintLinear_Impl>()->setInputUnitTypeforz(inputUnitTypeforz);
725 }
726
727 ✗ void CurveQuintLinear::resetInputUnitTypeforz() {
728 ✗ getImpl<detail::CurveQuintLinear_Impl>()->resetInputUnitTypeforz();
729 ✗ }
730
731 /// @cond
732
1/1
✓ Branch 2 taken 26 times.
26 CurveQuintLinear::CurveQuintLinear(std::shared_ptr<detail::CurveQuintLinear_Impl> impl) : Curve(impl) {}
733 /// @endcond
734
735 } // namespace model
736 } // namespace openstudio
737