GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 94.4% 17 / 0 / 18
Functions: 100.0% 1 / 0 / 1
Branches: 72.7% 16 / 0 / 22

src/energyplus/ReverseTranslator/ReverseTranslateWindowMaterialSimpleGlazingSystem.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/SimpleGlazing.hpp"
9 #include "../../model/SimpleGlazing_Impl.hpp"
10
11 #include <utilities/idd/WindowMaterial_SimpleGlazingSystem_FieldEnums.hxx>
12
13 using namespace openstudio::model;
14
15 namespace openstudio {
16
17 namespace energyplus {
18
19 2 OptionalModelObject ReverseTranslator::translateWindowMaterialSimpleGlazingSystem(const WorkspaceObject& workspaceObject) {
20 2 OptionalModelObject result;
21
1/1
✓ Branch 1 taken 2 times.
2 SimpleGlazing simpleGlazing(m_model);
22
1/1
✓ Branch 1 taken 2 times.
2 OptionalString optS = workspaceObject.name();
23
1/2
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
2 if (optS) {
24
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 simpleGlazing.setName(*optS);
25 }
26
27
1/1
✓ Branch 1 taken 2 times.
2 OptionalDouble d = workspaceObject.getDouble(WindowMaterial_SimpleGlazingSystemFields::UFactor);
28
1/2
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
2 if (d) {
29
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 simpleGlazing.setUFactor(*d);
30 }
31
32
1/1
✓ Branch 1 taken 2 times.
2 d = workspaceObject.getDouble(WindowMaterial_SimpleGlazingSystemFields::SolarHeatGainCoefficient);
33
1/2
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
2 if (d) {
34
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 simpleGlazing.setSolarHeatGainCoefficient(*d);
35 }
36
37
1/1
✓ Branch 1 taken 2 times.
2 d = workspaceObject.getDouble(WindowMaterial_SimpleGlazingSystemFields::VisibleTransmittance);
38
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
2 if (d) {
39 ✗ simpleGlazing.setVisibleTransmittance(*d);
40 }
41
42
1/1
✓ Branch 1 taken 2 times.
2 result = simpleGlazing;
43 4 return result;
44 2 }
45
46 } // namespace energyplus
47
48 } // namespace openstudio
49