GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 0.0% 0 / 0 / 30
Functions: 0.0% 0 / 0 / 1
Branches: 0.0% 0 / 0 / 62

src/energyplus/ReverseTranslator/ReverseTranslateCurveDoubleExponentialDecay.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 "../ReverseTranslator.hpp"
7
8 #include "../../model/CurveDoubleExponentialDecay.hpp"
9 #include "../../model/CurveDoubleExponentialDecay_Impl.hpp"
10
11 #include <utilities/idd/Curve_DoubleExponentialDecay_FieldEnums.hxx>
12
13 using namespace openstudio::model;
14
15 namespace openstudio {
16 namespace energyplus {
17
18 ✗ boost::optional<ModelObject> ReverseTranslator::translateCurveDoubleExponentialDecay(const WorkspaceObject& workspaceObject) {
19 ✗ CurveDoubleExponentialDecay curve(m_model);
20
21 ✗ OptionalString s;
22 ✗ OptionalDouble d;
23
24 ✗ if ((s = workspaceObject.name())) {
25 ✗ curve.setName(*s);
26 }
27
28 ✗ if ((d = workspaceObject.getDouble(Curve_DoubleExponentialDecayFields::Coefficient1C1))) {
29 ✗ curve.setCoefficient1C1(*d);
30 }
31 ✗ if ((d = workspaceObject.getDouble(Curve_DoubleExponentialDecayFields::Coefficient2C2))) {
32 ✗ curve.setCoefficient2C2(*d);
33 }
34 ✗ if ((d = workspaceObject.getDouble(Curve_DoubleExponentialDecayFields::Coefficient3C3))) {
35 ✗ curve.setCoefficient3C3(*d);
36 }
37 ✗ if ((d = workspaceObject.getDouble(Curve_DoubleExponentialDecayFields::Coefficient4C4))) {
38 ✗ curve.setCoefficient4C4(*d);
39 }
40 ✗ if ((d = workspaceObject.getDouble(Curve_DoubleExponentialDecayFields::Coefficient5C5))) {
41 ✗ curve.setCoefficient5C5(*d);
42 }
43 ✗ if ((d = workspaceObject.getDouble(Curve_DoubleExponentialDecayFields::MinimumValueofx))) {
44 ✗ curve.setMinimumValueofx(*d);
45 }
46 ✗ if ((d = workspaceObject.getDouble(Curve_DoubleExponentialDecayFields::MaximumValueofx))) {
47 ✗ curve.setMaximumValueofx(*d);
48 }
49 ✗ if ((d = workspaceObject.getDouble(Curve_DoubleExponentialDecayFields::MinimumCurveOutput))) {
50 ✗ curve.setMinimumCurveOutput(*d);
51 }
52 ✗ if ((d = workspaceObject.getDouble(Curve_DoubleExponentialDecayFields::MaximumCurveOutput))) {
53 ✗ curve.setMaximumCurveOutput(*d);
54 }
55 ✗ if ((s = workspaceObject.getString(Curve_DoubleExponentialDecayFields::InputUnitTypeforx, false, true))) {
56 ✗ curve.setInputUnitTypeforx(*s);
57 }
58 ✗ if ((s = workspaceObject.getString(Curve_DoubleExponentialDecayFields::OutputUnitType, false, true))) {
59 ✗ curve.setOutputUnitType(*s);
60 }
61
62 ✗ return curve;
63 ✗ }
64
65 } // namespace energyplus
66 } // namespace openstudio
67