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: 100.0% 16 / 0 / 16

src/energyplus/ForwardTranslator/ForwardTranslateSimpleGlazing.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/SimpleGlazing.hpp"
9 #include "../../model/SimpleGlazing_Impl.hpp"
10
11 #include <utilities/idd/WindowMaterial_SimpleGlazingSystem_FieldEnums.hxx>
12 #include "../../utilities/idd/IddEnums.hpp"
13 #include <utilities/idd/IddEnums.hxx>
14
15 using namespace openstudio::model;
16
17 using namespace std;
18
19 namespace openstudio {
20
21 namespace energyplus {
22
23 46 boost::optional<IdfObject> ForwardTranslator::translateSimpleGlazing(SimpleGlazing& modelObject) {
24
2/2
✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
46 IdfObject idfObject(openstudio::IddObjectType::WindowMaterial_SimpleGlazingSystem);
25
26
1/1
✓ Branch 1 taken 46 times.
46 m_idfObjects.push_back(idfObject);
27
28
3/3
✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
✓ Branch 7 taken 46 times.
46 idfObject.setString(WindowMaterial_SimpleGlazingSystemFields::Name, modelObject.name().get());
29
30
2/2
✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
46 idfObject.setDouble(WindowMaterial_SimpleGlazingSystemFields::UFactor, modelObject.uFactor());
31
32
2/2
✓ Branch 1 taken 46 times.
✓ Branch 4 taken 46 times.
46 idfObject.setDouble(WindowMaterial_SimpleGlazingSystemFields::SolarHeatGainCoefficient, modelObject.solarHeatGainCoefficient());
33
34
1/1
✓ Branch 1 taken 46 times.
46 OptionalDouble d = modelObject.visibleTransmittance();
35
2/2
✓ Branch 0 taken 35 times.
✓ Branch 1 taken 11 times.
46 if (d) {
36
2/2
✓ Branch 1 taken 35 times.
✓ Branch 4 taken 35 times.
35 idfObject.setDouble(WindowMaterial_SimpleGlazingSystemFields::VisibleTransmittance, *d);
37 }
38
39
1/1
✓ Branch 1 taken 46 times.
92 return boost::optional<IdfObject>(idfObject);
40 46 }
41
42 } // namespace energyplus
43
44 } // namespace openstudio
45