GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 48.3% 29 / 0 / 60
Functions: 47.4% 9 / 0 / 19
Branches: 22.8% 13 / 0 / 57

src/model/SurfacePropertyOtherSideConditionsModel.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 "SurfacePropertyOtherSideConditionsModel.hpp"
7 #include "SurfacePropertyOtherSideConditionsModel_Impl.hpp"
8
9 #include <utilities/idd/IddFactory.hxx>
10 #include <utilities/idd/IddEnums.hxx>
11 #include <utilities/idd/OS_SurfaceProperty_OtherSideConditionsModel_FieldEnums.hxx>
12
13 #include "../utilities/core/Assert.hpp"
14
15 namespace openstudio {
16 namespace model {
17
18 namespace detail {
19
20 14 SurfacePropertyOtherSideConditionsModel_Impl::SurfacePropertyOtherSideConditionsModel_Impl(const IdfObject& idfObject, Model_Impl* model,
21 14 bool keepHandle)
22 14 : ResourceObject_Impl(idfObject, model, keepHandle) {
23
4/6
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
✓ Branch 7 taken 14 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 14 times.
✗ Branch 13 not taken.
14 OS_ASSERT(idfObject.iddObject().type() == SurfacePropertyOtherSideConditionsModel::iddObjectType());
24 14 }
25
26 ✗ SurfacePropertyOtherSideConditionsModel_Impl::SurfacePropertyOtherSideConditionsModel_Impl(const openstudio::detail::WorkspaceObject_Impl& other,
27 ✗ Model_Impl* model, bool keepHandle)
28 ✗ : ResourceObject_Impl(other, model, keepHandle) {
29 ✗ OS_ASSERT(other.iddObject().type() == SurfacePropertyOtherSideConditionsModel::iddObjectType());
30 ✗ }
31
32 4 SurfacePropertyOtherSideConditionsModel_Impl::SurfacePropertyOtherSideConditionsModel_Impl(
33 4 const SurfacePropertyOtherSideConditionsModel_Impl& other, Model_Impl* model, bool keepHandle)
34 4 : ResourceObject_Impl(other, model, keepHandle) {}
35
36 ✗ const std::vector<std::string>& SurfacePropertyOtherSideConditionsModel_Impl::outputVariableNames() const {
37 static const std::vector<std::string> result{"Surface Other Side Conditions Modeled Convection Air Temperature",
38 "Surface Other Side Conditions Modeled Convection Heat Transfer Coefficient",
39 "Surface Other Side Conditions Modeled Radiation Temperature",
40 ✗ "Surface Other Side Conditions Modeled Radiation Heat Transfer Coefficient"};
41 ✗ return result;
42 ✗ }
43
44 ✗ IddObjectType SurfacePropertyOtherSideConditionsModel_Impl::iddObjectType() const {
45 ✗ return SurfacePropertyOtherSideConditionsModel::iddObjectType();
46 }
47
48 4 std::string SurfacePropertyOtherSideConditionsModel_Impl::typeOfModeling() const {
49
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<std::string> value = getString(OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling, true);
50
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
51
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
8 return value.get();
52 4 }
53
54 ✗ bool SurfacePropertyOtherSideConditionsModel_Impl::isTypeOfModelingDefaulted() const {
55 ✗ return isEmpty(OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling);
56 }
57
58 6 bool SurfacePropertyOtherSideConditionsModel_Impl::setTypeOfModeling(const std::string& typeOfModeling) {
59 6 bool result = setString(OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling, typeOfModeling);
60 6 return result;
61 }
62
63 ✗ void SurfacePropertyOtherSideConditionsModel_Impl::resetTypeOfModeling() {
64 ✗ bool result = setString(OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling, "");
65 ✗ OS_ASSERT(result);
66 ✗ }
67
68 ✗ std::vector<EMSActuatorNames> SurfacePropertyOtherSideConditionsModel_Impl::emsActuatorNames() const {
69 std::vector<EMSActuatorNames> actuators{{"Other Side Boundary Conditions", "Convection Bulk Air Temperature"},
70 {"Other Side Boundary Conditions", "Convection Heat Transfer Coefficient"},
71 {"Other Side Boundary Conditions", "Radiation Effective Temperature"},
72 ✗ {"Other Side Boundary Conditions", "Radiation Linear Heat Transfer Coefficient"}};
73 ✗ return actuators;
74 ✗ }
75
76 ✗ std::vector<std::string> SurfacePropertyOtherSideConditionsModel_Impl::emsInternalVariableNames() const {
77 ✗ std::vector<std::string> types;
78 ✗ return types;
79 }
80 } // namespace detail
81
82 14 SurfacePropertyOtherSideConditionsModel::SurfacePropertyOtherSideConditionsModel(const Model& model)
83 14 : ResourceObject(SurfacePropertyOtherSideConditionsModel::iddObjectType(), model) {
84
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 14 times.
✗ Branch 5 not taken.
14 OS_ASSERT(getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>());
85 14 }
86
87 7758 IddObjectType SurfacePropertyOtherSideConditionsModel::iddObjectType() {
88
1/1
✓ Branch 1 taken 7758 times.
7758 return {IddObjectType::OS_SurfaceProperty_OtherSideConditionsModel};
89 }
90
91 ✗ std::vector<std::string> SurfacePropertyOtherSideConditionsModel::typeOfModelingValues() {
92 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling);
93 }
94
95 4 std::string SurfacePropertyOtherSideConditionsModel::typeOfModeling() const {
96
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>()->typeOfModeling();
97 }
98
99 ✗ bool SurfacePropertyOtherSideConditionsModel::isTypeOfModelingDefaulted() const {
100 ✗ return getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>()->isTypeOfModelingDefaulted();
101 }
102
103 6 bool SurfacePropertyOtherSideConditionsModel::setTypeOfModeling(const std::string& typeOfModeling) {
104
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>()->setTypeOfModeling(typeOfModeling);
105 }
106
107 ✗ void SurfacePropertyOtherSideConditionsModel::resetTypeOfModeling() {
108 ✗ getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>()->resetTypeOfModeling();
109 ✗ }
110
111 /// @cond
112 27 SurfacePropertyOtherSideConditionsModel::SurfacePropertyOtherSideConditionsModel(
113 27 std::shared_ptr<detail::SurfacePropertyOtherSideConditionsModel_Impl> impl)
114
1/1
✓ Branch 3 taken 27 times.
27 : ResourceObject(std::move(impl)) {}
115 /// @endcond
116
117 } // namespace model
118 } // namespace openstudio
119