GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 11 / 0 / 11
Functions: 100.0% 1 / 0 / 1
Branches: 91.7% 11 / 0 / 12

src/energyplus/ForwardTranslator/ForwardTranslateEnergyManagementSystemCurveOrTableIndexVariable.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 "../ForwardTranslator.hpp"
7
8 #include "../../model/Model.hpp"
9 #include "../../model/OutputVariable.hpp"
10 #include "../../model/OutputVariable_Impl.hpp"
11 #include "../../model/OutputMeter.hpp"
12 #include "../../model/OutputMeter_Impl.hpp"
13 #include "../../model/Schedule.hpp"
14 #include "../../model/Schedule_Impl.hpp"
15 #include "../../model/EnergyManagementSystemCurveOrTableIndexVariable.hpp"
16 #include "../../model/EnergyManagementSystemCurveOrTableIndexVariable_Impl.hpp"
17
18 #include <utilities/idd/EnergyManagementSystem_CurveOrTableIndexVariable_FieldEnums.hxx>
19 #include "../../utilities/idd/IddEnums.hpp"
20 #include <utilities/idd/IddEnums.hxx>
21
22 using namespace openstudio::model;
23
24 using namespace std;
25
26 namespace openstudio {
27
28 namespace energyplus {
29
30 boost::optional<IdfObject>
31 2 ForwardTranslator::translateEnergyManagementSystemCurveOrTableIndexVariable(EnergyManagementSystemCurveOrTableIndexVariable& modelObject) {
32 2 boost::optional<std::string> s;
33
34
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 IdfObject idfObject(openstudio::IddObjectType::EnergyManagementSystem_CurveOrTableIndexVariable);
35
1/1
✓ Branch 1 taken 2 times.
2 m_idfObjects.push_back(idfObject);
36 //Name
37
1/1
✓ Branch 1 taken 2 times.
2 s = modelObject.name();
38
1/2
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
2 if (s) {
39
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 idfObject.setName(*s);
40 }
41
42
1/1
✓ Branch 1 taken 2 times.
2 idfObject.setString(EnergyManagementSystem_CurveOrTableIndexVariableFields::CurveorTableObjectName,
43
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
4 modelObject.curveOrTableObject().nameString());
44
45
1/1
✓ Branch 1 taken 2 times.
4 return idfObject;
46 2 }
47
48 } // namespace energyplus
49
50 } // namespace openstudio
51