GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 46.7% 28 / 0 / 60
Functions: 42.9% 9 / 0 / 21
Branches: 29.7% 11 / 0 / 37

src/model/CFactorUndergroundWallConstruction.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 "CFactorUndergroundWallConstruction.hpp"
7 #include "CFactorUndergroundWallConstruction_Impl.hpp"
8
9 #include "Material.hpp"
10 #include "Material_Impl.hpp"
11 #include "ModelExtensibleGroup.hpp"
12
13 #include <utilities/idd/OS_Construction_CfactorUndergroundWall_FieldEnums.hxx>
14 #include <utilities/idd/IddEnums.hxx>
15
16 #include "../utilities/core/Assert.hpp"
17
18 namespace openstudio {
19 namespace model {
20
21 namespace detail {
22
23 2 CFactorUndergroundWallConstruction_Impl::CFactorUndergroundWallConstruction_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
24 2 : ConstructionBase_Impl(idfObject, model, keepHandle) {
25
4/6
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 13 not taken.
2 OS_ASSERT(idfObject.iddObject().type() == CFactorUndergroundWallConstruction::iddObjectType());
26 2 }
27
28 ✗ CFactorUndergroundWallConstruction_Impl::CFactorUndergroundWallConstruction_Impl(const openstudio::detail::WorkspaceObject_Impl& other,
29 ✗ Model_Impl* model, bool keepHandle)
30 ✗ : ConstructionBase_Impl(other, model, keepHandle) {
31 ✗ OS_ASSERT(other.iddObject().type() == CFactorUndergroundWallConstruction::iddObjectType());
32 ✗ }
33
34 9 CFactorUndergroundWallConstruction_Impl::CFactorUndergroundWallConstruction_Impl(const CFactorUndergroundWallConstruction_Impl& other,
35 9 Model_Impl* model, bool keepHandle)
36 9 : ConstructionBase_Impl(other, model, keepHandle) {}
37
38 ✗ const std::vector<std::string>& CFactorUndergroundWallConstruction_Impl::outputVariableNames() const {
39 ✗ static const std::vector<std::string> result;
40 ✗ return result;
41 }
42
43 ✗ IddObjectType CFactorUndergroundWallConstruction_Impl::iddObjectType() const {
44 ✗ return CFactorUndergroundWallConstruction::iddObjectType();
45 }
46
47 ✗ bool CFactorUndergroundWallConstruction_Impl::isOpaque() const {
48 ✗ return true;
49 }
50
51 ✗ bool CFactorUndergroundWallConstruction_Impl::isFenestration() const {
52 ✗ return false;
53 }
54
55 ✗ bool CFactorUndergroundWallConstruction_Impl::isSolarDiffusing() const {
56 ✗ return false;
57 }
58
59 ✗ bool CFactorUndergroundWallConstruction_Impl::isModelPartition() const {
60 ✗ return false;
61 }
62
63 ✗ int CFactorUndergroundWallConstruction_Impl::renderingColorIndex() const {
64 ✗ return OS_Construction_CfactorUndergroundWallFields::SurfaceRenderingName;
65 }
66
67 ✗ double CFactorUndergroundWallConstruction_Impl::cFactor() const {
68 ✗ boost::optional<double> value = getDouble(OS_Construction_CfactorUndergroundWallFields::CFactor, true);
69 ✗ OS_ASSERT(value);
70 ✗ return value.get();
71 }
72
73 3 bool CFactorUndergroundWallConstruction_Impl::setCFactor(double cFactor) {
74 3 bool result = setDouble(OS_Construction_CfactorUndergroundWallFields::CFactor, cFactor);
75 3 return result;
76 }
77
78 ✗ double CFactorUndergroundWallConstruction_Impl::height() const {
79 ✗ boost::optional<double> value = getDouble(OS_Construction_CfactorUndergroundWallFields::Height, true);
80 ✗ OS_ASSERT(value);
81 ✗ return value.get();
82 }
83
84 6 bool CFactorUndergroundWallConstruction_Impl::setHeight(double height) {
85 6 bool result = setDouble(OS_Construction_CfactorUndergroundWallFields::Height, height);
86 6 return result;
87 }
88
89 } // namespace detail
90
91 2 CFactorUndergroundWallConstruction::CFactorUndergroundWallConstruction(const Model& model, double cFactor, double height)
92 2 : ConstructionBase(CFactorUndergroundWallConstruction::iddObjectType(), model) {
93
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 2 times.
✗ Branch 5 not taken.
2 OS_ASSERT(getImpl<detail::CFactorUndergroundWallConstruction_Impl>());
94
95
1/1
✓ Branch 1 taken 2 times.
2 this->setCFactor(cFactor);
96
1/1
✓ Branch 1 taken 2 times.
2 this->setHeight(height);
97 2 }
98
99 7605 IddObjectType CFactorUndergroundWallConstruction::iddObjectType() {
100
1/1
✓ Branch 1 taken 7605 times.
7605 IddObjectType result(IddObjectType::OS_Construction_CfactorUndergroundWall);
101 7605 return result;
102 }
103
104 ✗ double CFactorUndergroundWallConstruction::cFactor() const {
105 ✗ return getImpl<detail::CFactorUndergroundWallConstruction_Impl>()->cFactor();
106 }
107
108 3 bool CFactorUndergroundWallConstruction::setCFactor(double cFactor) {
109
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::CFactorUndergroundWallConstruction_Impl>()->setCFactor(cFactor);
110 }
111
112 ✗ double CFactorUndergroundWallConstruction::height() const {
113 ✗ return getImpl<detail::CFactorUndergroundWallConstruction_Impl>()->height();
114 }
115
116 6 bool CFactorUndergroundWallConstruction::setHeight(double height) {
117
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CFactorUndergroundWallConstruction_Impl>()->setHeight(height);
118 }
119
120 /// @cond
121 19 CFactorUndergroundWallConstruction::CFactorUndergroundWallConstruction(std::shared_ptr<detail::CFactorUndergroundWallConstruction_Impl> impl)
122
1/1
✓ Branch 3 taken 19 times.
19 : ConstructionBase(std::move(impl)) {}
123 /// @endcond
124
125 } // namespace model
126 } // namespace openstudio
127