GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 60.4% 61 / 0 / 101
Functions: 65.7% 23 / 0 / 35
Branches: 36.0% 27 / 0 / 75

src/model/OutputEnergyManagementSystem.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 "OutputEnergyManagementSystem.hpp"
7 #include "OutputEnergyManagementSystem_Impl.hpp"
8
9 #include <utilities/idd/IddFactory.hxx>
10 #include <utilities/idd/IddEnums.hxx>
11 #include <utilities/idd/OS_Output_EnergyManagementSystem_FieldEnums.hxx>
12
13 #include "../utilities/core/Assert.hpp"
14
15 namespace openstudio {
16 namespace model {
17
18 namespace detail {
19
20 10 OutputEnergyManagementSystem_Impl::OutputEnergyManagementSystem_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
21 10 : ModelObject_Impl(idfObject, model, keepHandle) {
22
4/6
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 10 times.
✗ Branch 13 not taken.
10 OS_ASSERT(idfObject.iddObject().type() == OutputEnergyManagementSystem::iddObjectType());
23 10 }
24
25 ✗ OutputEnergyManagementSystem_Impl::OutputEnergyManagementSystem_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
26 ✗ bool keepHandle)
27 ✗ : ModelObject_Impl(other, model, keepHandle) {
28 ✗ OS_ASSERT(other.iddObject().type() == OutputEnergyManagementSystem::iddObjectType());
29 ✗ }
30
31 12 OutputEnergyManagementSystem_Impl::OutputEnergyManagementSystem_Impl(const OutputEnergyManagementSystem_Impl& other, Model_Impl* model,
32 12 bool keepHandle)
33 12 : ModelObject_Impl(other, model, keepHandle) {}
34
35 ✗ const std::vector<std::string>& OutputEnergyManagementSystem_Impl::outputVariableNames() const {
36 ✗ static const std::vector<std::string> result;
37 ✗ return result;
38 }
39
40 ✗ IddObjectType OutputEnergyManagementSystem_Impl::iddObjectType() const {
41 ✗ return OutputEnergyManagementSystem::iddObjectType();
42 }
43
44 11 std::string OutputEnergyManagementSystem_Impl::actuatorAvailabilityDictionaryReporting() const {
45
1/1
✓ Branch 1 taken 11 times.
11 boost::optional<std::string> value = getString(OS_Output_EnergyManagementSystemFields::ActuatorAvailabilityDictionaryReporting, true);
46
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
11 OS_ASSERT(value);
47
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
22 return value.get();
48 11 }
49
50 1 bool OutputEnergyManagementSystem_Impl::isActuatorAvailabilityDictionaryReportingDefaulted() const {
51 1 return isEmpty(OS_Output_EnergyManagementSystemFields::ActuatorAvailabilityDictionaryReporting);
52 }
53
54 11 std::string OutputEnergyManagementSystem_Impl::internalVariableAvailabilityDictionaryReporting() const {
55
1/1
✓ Branch 1 taken 11 times.
11 boost::optional<std::string> value = getString(OS_Output_EnergyManagementSystemFields::InternalVariableAvailabilityDictionaryReporting, true);
56
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
11 OS_ASSERT(value);
57
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
22 return value.get();
58 11 }
59
60 1 bool OutputEnergyManagementSystem_Impl::isInternalVariableAvailabilityDictionaryReportingDefaulted() const {
61 1 return isEmpty(OS_Output_EnergyManagementSystemFields::InternalVariableAvailabilityDictionaryReporting);
62 }
63
64 11 std::string OutputEnergyManagementSystem_Impl::eMSRuntimeLanguageDebugOutputLevel() const {
65
1/1
✓ Branch 1 taken 11 times.
11 boost::optional<std::string> value = getString(OS_Output_EnergyManagementSystemFields::EMSRuntimeLanguageDebugOutputLevel, true);
66
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
11 OS_ASSERT(value);
67
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
22 return value.get();
68 11 }
69
70 1 bool OutputEnergyManagementSystem_Impl::isEMSRuntimeLanguageDebugOutputLevelDefaulted() const {
71 1 return isEmpty(OS_Output_EnergyManagementSystemFields::EMSRuntimeLanguageDebugOutputLevel);
72 }
73
74 6 bool OutputEnergyManagementSystem_Impl::setActuatorAvailabilityDictionaryReporting(const std::string& actuatorAvailabilityDictionaryReporting) {
75 bool result =
76 6 setString(OS_Output_EnergyManagementSystemFields::ActuatorAvailabilityDictionaryReporting, actuatorAvailabilityDictionaryReporting);
77 6 return result;
78 }
79
80 ✗ void OutputEnergyManagementSystem_Impl::resetActuatorAvailabilityDictionaryReporting() {
81 ✗ bool result = setString(OS_Output_EnergyManagementSystemFields::ActuatorAvailabilityDictionaryReporting, "");
82 ✗ OS_ASSERT(result);
83 ✗ }
84
85 2 bool OutputEnergyManagementSystem_Impl::setInternalVariableAvailabilityDictionaryReporting(
86 const std::string& internalVariableAvailabilityDictionaryReporting) {
87 2 bool result = setString(OS_Output_EnergyManagementSystemFields::InternalVariableAvailabilityDictionaryReporting,
88 internalVariableAvailabilityDictionaryReporting);
89 2 return result;
90 }
91
92 ✗ void OutputEnergyManagementSystem_Impl::resetInternalVariableAvailabilityDictionaryReporting() {
93 ✗ bool result = setString(OS_Output_EnergyManagementSystemFields::InternalVariableAvailabilityDictionaryReporting, "");
94 ✗ OS_ASSERT(result);
95 ✗ }
96
97 2 bool OutputEnergyManagementSystem_Impl::setEMSRuntimeLanguageDebugOutputLevel(const std::string& eMSRuntimeLanguageDebugOutputLevel) {
98 2 bool result = setString(OS_Output_EnergyManagementSystemFields::EMSRuntimeLanguageDebugOutputLevel, eMSRuntimeLanguageDebugOutputLevel);
99 2 return result;
100 }
101
102 ✗ void OutputEnergyManagementSystem_Impl::resetEMSRuntimeLanguageDebugOutputLevel() {
103 ✗ bool result = setString(OS_Output_EnergyManagementSystemFields::EMSRuntimeLanguageDebugOutputLevel, "");
104 ✗ OS_ASSERT(result);
105 ✗ }
106
107 } // namespace detail
108
109 7764 IddObjectType OutputEnergyManagementSystem::iddObjectType() {
110
1/1
✓ Branch 1 taken 7764 times.
7764 return {IddObjectType::OS_Output_EnergyManagementSystem};
111 }
112
113 ✗ std::vector<std::string> OutputEnergyManagementSystem::actuatorAvailabilityDictionaryReportingValues() {
114 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(),
115 ✗ OS_Output_EnergyManagementSystemFields::ActuatorAvailabilityDictionaryReporting);
116 }
117
118 ✗ std::vector<std::string> OutputEnergyManagementSystem::internalVariableAvailabilityDictionaryReportingValues() {
119 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(),
120 ✗ OS_Output_EnergyManagementSystemFields::InternalVariableAvailabilityDictionaryReporting);
121 }
122
123 ✗ std::vector<std::string> OutputEnergyManagementSystem::eMSRuntimeLanguageDebugOutputLevelValues() {
124 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(),
125 ✗ OS_Output_EnergyManagementSystemFields::EMSRuntimeLanguageDebugOutputLevel);
126 }
127
128 11 std::string OutputEnergyManagementSystem::actuatorAvailabilityDictionaryReporting() const {
129
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::OutputEnergyManagementSystem_Impl>()->actuatorAvailabilityDictionaryReporting();
130 }
131
132 1 bool OutputEnergyManagementSystem::isActuatorAvailabilityDictionaryReportingDefaulted() const {
133
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::OutputEnergyManagementSystem_Impl>()->isActuatorAvailabilityDictionaryReportingDefaulted();
134 }
135
136 11 std::string OutputEnergyManagementSystem::internalVariableAvailabilityDictionaryReporting() const {
137
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::OutputEnergyManagementSystem_Impl>()->internalVariableAvailabilityDictionaryReporting();
138 }
139
140 1 bool OutputEnergyManagementSystem::isInternalVariableAvailabilityDictionaryReportingDefaulted() const {
141
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::OutputEnergyManagementSystem_Impl>()->isInternalVariableAvailabilityDictionaryReportingDefaulted();
142 }
143
144 11 std::string OutputEnergyManagementSystem::eMSRuntimeLanguageDebugOutputLevel() const {
145
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::OutputEnergyManagementSystem_Impl>()->eMSRuntimeLanguageDebugOutputLevel();
146 }
147
148 1 bool OutputEnergyManagementSystem::isEMSRuntimeLanguageDebugOutputLevelDefaulted() const {
149
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::OutputEnergyManagementSystem_Impl>()->isEMSRuntimeLanguageDebugOutputLevelDefaulted();
150 }
151
152 6 bool OutputEnergyManagementSystem::setActuatorAvailabilityDictionaryReporting(const std::string& actuatorAvailabilityDictionaryReporting) {
153
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::OutputEnergyManagementSystem_Impl>()->setActuatorAvailabilityDictionaryReporting(actuatorAvailabilityDictionaryReporting);
154 }
155
156 ✗ void OutputEnergyManagementSystem::resetActuatorAvailabilityDictionaryReporting() {
157 ✗ getImpl<detail::OutputEnergyManagementSystem_Impl>()->resetActuatorAvailabilityDictionaryReporting();
158 ✗ }
159
160 2 bool OutputEnergyManagementSystem::setInternalVariableAvailabilityDictionaryReporting(
161 const std::string& internalVariableAvailabilityDictionaryReporting) {
162
1/1
✓ Branch 3 taken 2 times.
4 return getImpl<detail::OutputEnergyManagementSystem_Impl>()->setInternalVariableAvailabilityDictionaryReporting(
163 4 internalVariableAvailabilityDictionaryReporting);
164 }
165
166 ✗ void OutputEnergyManagementSystem::resetInternalVariableAvailabilityDictionaryReporting() {
167 ✗ getImpl<detail::OutputEnergyManagementSystem_Impl>()->resetInternalVariableAvailabilityDictionaryReporting();
168 ✗ }
169
170 2 bool OutputEnergyManagementSystem::setEMSRuntimeLanguageDebugOutputLevel(const std::string& eMSRuntimeLanguageDebugOutputLevel) {
171
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::OutputEnergyManagementSystem_Impl>()->setEMSRuntimeLanguageDebugOutputLevel(eMSRuntimeLanguageDebugOutputLevel);
172 }
173
174 ✗ void OutputEnergyManagementSystem::resetEMSRuntimeLanguageDebugOutputLevel() {
175 ✗ getImpl<detail::OutputEnergyManagementSystem_Impl>()->resetEMSRuntimeLanguageDebugOutputLevel();
176 ✗ }
177
178 /// @cond
179 15 OutputEnergyManagementSystem::OutputEnergyManagementSystem(std::shared_ptr<detail::OutputEnergyManagementSystem_Impl> impl)
180
1/1
✓ Branch 3 taken 15 times.
15 : ModelObject(std::move(impl)) {}
181 10 OutputEnergyManagementSystem::OutputEnergyManagementSystem(Model& model) : ModelObject(OutputEnergyManagementSystem::iddObjectType(), model) {}
182
183 /// @endcond
184
185 } // namespace model
186 } // namespace openstudio
187