GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 86.1% 278 / 0 / 323
Functions: 94.3% 82 / 0 / 87
Branches: 68.4% 134 / 0 / 196

src/utilities/filetypes/ForwardTranslatorOptions.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 "ForwardTranslatorOptions.hpp"
7 #include "ForwardTranslatorOptions_Impl.hpp"
8
9 #include <json/json.h>
10
11 #include <memory>
12 #include <string>
13
14 namespace openstudio {
15 namespace detail {
16
17 ✗ void ForwardTranslatorOptions_Impl::reset() {
18 ✗ m_runcontrolspecialdays = DEFAULT_RUNCONTROLSPECIALDAYS;
19 ✗ m_is_runcontrolspecialdays_defaulted = true;
20
21 ✗ m_ip_tabular_output = DEFAULT_IP_TABULAR_OUTPUT;
22 ✗ m_is_ip_tabular_output_defaulted = true;
23
24 ✗ m_no_lifecyclecosts = DEFAULT_NO_LIFECYCLECOSTS;
25 ✗ m_is_no_lifecyclecosts_defaulted = true;
26
27 ✗ m_no_sqlite_output = DEFAULT_NO_SQLITE_OUTPUT;
28 ✗ m_is_no_sqlite_output_defaulted = true;
29
30 ✗ m_no_html_output = DEFAULT_NO_HTML_OUTPUT;
31 ✗ m_is_no_html_output_defaulted = true;
32
33 ✗ m_no_variable_dictionary = DEFAULT_NO_VARIABLE_DICTIONARY;
34 ✗ m_is_no_variable_dictionary_defaulted = true;
35
36 ✗ m_no_space_translation = DEFAULT_NO_SPACE_TRANSLATION;
37 ✗ m_is_no_space_translation_defaulted = true;
38
39 ✗ m_no_space_load_instances = DEFAULT_NO_SPACE_LOAD_INSTANCES;
40 ✗ m_is_no_space_load_instances_defaulted = true;
41
42 ✗ m_no_construction_assignment_sets = DEFAULT_NO_CONSTRUCTION_ASSIGNMENT_SETS;
43 ✗ m_is_no_construction_assignment_sets_defaulted = true;
44 ✗ }
45
46 911 bool ForwardTranslatorOptions_Impl::keepRunControlSpecialDays() const {
47 911 return m_runcontrolspecialdays;
48 }
49
50 7 bool ForwardTranslatorOptions_Impl::isKeepRunControlSpecialDaysDefaulted() const {
51 7 return m_is_runcontrolspecialdays_defaulted;
52 }
53
54 5 void ForwardTranslatorOptions_Impl::setKeepRunControlSpecialDays(bool keepRunControlSpecialDays) {
55 5 m_runcontrolspecialdays = keepRunControlSpecialDays;
56 5 m_is_runcontrolspecialdays_defaulted = false;
57 5 }
58
59 1 void ForwardTranslatorOptions_Impl::resetKeepRunControlSpecialDays() {
60 1 m_runcontrolspecialdays = DEFAULT_RUNCONTROLSPECIALDAYS;
61 1 m_is_runcontrolspecialdays_defaulted = true;
62 1 }
63
64 861 bool ForwardTranslatorOptions_Impl::iPTabularOutput() const {
65 861 return m_ip_tabular_output;
66 }
67
68 7 bool ForwardTranslatorOptions_Impl::isIPTabularOutputDefaulted() const {
69 7 return m_is_ip_tabular_output_defaulted;
70 }
71
72 7 void ForwardTranslatorOptions_Impl::setIPTabularOutput(bool iPTabularOutput) {
73 7 m_ip_tabular_output = iPTabularOutput;
74 7 m_is_ip_tabular_output_defaulted = false;
75 7 }
76
77 1 void ForwardTranslatorOptions_Impl::resetIPTabularOutput() {
78 1 m_ip_tabular_output = DEFAULT_IP_TABULAR_OUTPUT;
79 1 m_is_ip_tabular_output_defaulted = true;
80 1 }
81
82 1747 bool ForwardTranslatorOptions_Impl::excludeLCCObjects() const {
83 1747 return m_no_lifecyclecosts;
84 }
85
86 7 bool ForwardTranslatorOptions_Impl::isExcludeLCCObjectsDefaulted() const {
87 7 return m_is_no_lifecyclecosts_defaulted;
88 }
89
90 7 void ForwardTranslatorOptions_Impl::setExcludeLCCObjects(bool excludeLCCObjects) {
91 7 m_no_lifecyclecosts = excludeLCCObjects;
92 7 m_is_no_lifecyclecosts_defaulted = false;
93 7 }
94
95 1 void ForwardTranslatorOptions_Impl::resetExcludeLCCObjects() {
96 1 m_no_lifecyclecosts = DEFAULT_NO_LIFECYCLECOSTS;
97 1 m_is_no_lifecyclecosts_defaulted = true;
98 1 }
99
100 877 bool ForwardTranslatorOptions_Impl::excludeSQliteOutputReport() const {
101 877 return m_no_sqlite_output;
102 }
103
104 7 bool ForwardTranslatorOptions_Impl::isExcludeSQliteOutputReportDefaulted() const {
105 7 return m_is_no_sqlite_output_defaulted;
106 }
107
108 6 void ForwardTranslatorOptions_Impl::setExcludeSQliteOutputReport(bool excludeSQliteOutputReport) {
109 6 m_no_sqlite_output = excludeSQliteOutputReport;
110 6 m_is_no_sqlite_output_defaulted = false;
111 6 }
112
113 1 void ForwardTranslatorOptions_Impl::resetExcludeSQliteOutputReport() {
114 1 m_no_sqlite_output = DEFAULT_NO_SQLITE_OUTPUT;
115 1 m_is_no_sqlite_output_defaulted = true;
116 1 }
117
118 1747 bool ForwardTranslatorOptions_Impl::excludeHTMLOutputReport() const {
119 1747 return m_no_html_output;
120 }
121
122 6 bool ForwardTranslatorOptions_Impl::isExcludeHTMLOutputReportDefaulted() const {
123 6 return m_is_no_html_output_defaulted;
124 }
125
126 6 void ForwardTranslatorOptions_Impl::setExcludeHTMLOutputReport(bool excludeHTMLOutputReport) {
127 6 m_no_html_output = excludeHTMLOutputReport;
128 6 m_is_no_html_output_defaulted = false;
129 6 }
130
131 1 void ForwardTranslatorOptions_Impl::resetExcludeHTMLOutputReport() {
132 1 m_no_html_output = DEFAULT_NO_HTML_OUTPUT;
133 1 m_is_no_html_output_defaulted = true;
134 1 }
135
136 877 bool ForwardTranslatorOptions_Impl::excludeVariableDictionary() const {
137 877 return m_no_variable_dictionary;
138 }
139
140 6 bool ForwardTranslatorOptions_Impl::isExcludeVariableDictionaryDefaulted() const {
141 6 return m_is_no_variable_dictionary_defaulted;
142 }
143
144 5 void ForwardTranslatorOptions_Impl::setExcludeVariableDictionary(bool excludeVariableDictionary) {
145 5 m_no_variable_dictionary = excludeVariableDictionary;
146 5 m_is_no_variable_dictionary_defaulted = false;
147 5 }
148
149 1 void ForwardTranslatorOptions_Impl::resetExcludeVariableDictionary() {
150 1 m_no_variable_dictionary = DEFAULT_NO_VARIABLE_DICTIONARY;
151 1 m_is_no_variable_dictionary_defaulted = true;
152 1 }
153
154 7308 bool ForwardTranslatorOptions_Impl::excludeSpaceTranslation() const {
155 7308 return m_no_space_translation;
156 }
157
158 6 bool ForwardTranslatorOptions_Impl::isExcludeSpaceTranslationDefaulted() const {
159 6 return m_is_no_space_translation_defaulted;
160 }
161
162 125 void ForwardTranslatorOptions_Impl::setExcludeSpaceTranslation(bool excludeSpaceTranslation) {
163 125 m_no_space_translation = excludeSpaceTranslation;
164 125 m_is_no_space_translation_defaulted = false;
165 125 }
166
167 1 void ForwardTranslatorOptions_Impl::resetExcludeSpaceTranslation() {
168 1 m_no_space_translation = DEFAULT_NO_SPACE_TRANSLATION;
169 1 m_is_no_space_translation_defaulted = true;
170 1 }
171
172 706 bool ForwardTranslatorOptions_Impl::excludeSpaceLoadInstances() const {
173 706 return m_no_space_load_instances;
174 }
175
176 6 bool ForwardTranslatorOptions_Impl::isExcludeSpaceLoadInstancesDefaulted() const {
177 6 return m_is_no_space_load_instances_defaulted;
178 }
179
180 68 void ForwardTranslatorOptions_Impl::setExcludeSpaceLoadInstances(bool excludeSpaceLoadInstances) {
181 68 m_no_space_load_instances = excludeSpaceLoadInstances;
182 68 m_is_no_space_load_instances_defaulted = false;
183 68 }
184
185 1 void ForwardTranslatorOptions_Impl::resetExcludeSpaceLoadInstances() {
186 1 m_no_space_load_instances = DEFAULT_NO_SPACE_LOAD_INSTANCES;
187 1 m_is_no_space_load_instances_defaulted = true;
188 1 }
189
190 4213 bool ForwardTranslatorOptions_Impl::excludeConstructionAssignmentSets() const {
191 4213 return m_no_construction_assignment_sets;
192 }
193
194 6 bool ForwardTranslatorOptions_Impl::isExcludeConstructionAssignmentSetsDefaulted() const {
195 6 return m_is_no_construction_assignment_sets_defaulted;
196 }
197
198 7 void ForwardTranslatorOptions_Impl::setExcludeConstructionAssignmentSets(bool excludeConstructionAssignmentSets) {
199 7 m_no_construction_assignment_sets = excludeConstructionAssignmentSets;
200 7 m_is_no_construction_assignment_sets_defaulted = false;
201 7 }
202
203 1 void ForwardTranslatorOptions_Impl::resetExcludeConstructionAssignmentSets() {
204 1 m_no_construction_assignment_sets = DEFAULT_NO_CONSTRUCTION_ASSIGNMENT_SETS;
205 1 m_is_no_construction_assignment_sets_defaulted = true;
206 1 }
207
208 1 void ForwardTranslatorOptions_Impl::overrideValuesWith(const ForwardTranslatorOptions& other) {
209
1/2
✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
1 if (!other.isKeepRunControlSpecialDaysDefaulted()) {
210 1 setKeepRunControlSpecialDays(other.keepRunControlSpecialDays());
211 }
212
213
1/2
✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
1 if (!other.isIPTabularOutputDefaulted()) {
214 1 setIPTabularOutput(other.iPTabularOutput());
215 }
216
217
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (!other.isExcludeLCCObjectsDefaulted()) {
218 ✗ setExcludeLCCObjects(other.excludeLCCObjects());
219 }
220
221
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (!other.isExcludeSQliteOutputReportDefaulted()) {
222 ✗ setExcludeSQliteOutputReport(other.excludeSQliteOutputReport());
223 }
224
225
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (!other.isExcludeHTMLOutputReportDefaulted()) {
226 ✗ setExcludeHTMLOutputReport(other.excludeHTMLOutputReport());
227 }
228
229
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (!other.isExcludeVariableDictionaryDefaulted()) {
230 ✗ setExcludeVariableDictionary(other.excludeVariableDictionary());
231 }
232
233
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (!other.isExcludeSpaceTranslationDefaulted()) {
234 ✗ setExcludeSpaceTranslation(other.excludeSpaceTranslation());
235 }
236
237
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (!other.isExcludeSpaceLoadInstancesDefaulted()) {
238 ✗ setExcludeSpaceLoadInstances(other.excludeSpaceLoadInstances());
239 }
240
241
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (!other.isExcludeConstructionAssignmentSetsDefaulted()) {
242 ✗ setExcludeConstructionAssignmentSets(other.excludeConstructionAssignmentSets());
243 }
244 1 }
245
246 111 Json::Value ForwardTranslatorOptions_Impl::toJSON() const {
247 111 Json::Value value;
248
249
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 108 times.
111 if (!m_is_runcontrolspecialdays_defaulted) {
250
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 value["runcontrolspecialdays"] = m_runcontrolspecialdays;
251 }
252
253
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 108 times.
111 if (!m_is_ip_tabular_output_defaulted) {
254
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 value["ip_tabular_output"] = m_ip_tabular_output;
255 }
256
257
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 108 times.
111 if (!m_is_no_lifecyclecosts_defaulted) {
258
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 value["no_lifecyclecosts"] = m_no_lifecyclecosts;
259 }
260
261
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 108 times.
111 if (!m_is_no_sqlite_output_defaulted) {
262
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 value["no_sqlite_output"] = m_no_sqlite_output;
263 }
264
265
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 108 times.
111 if (!m_is_no_html_output_defaulted) {
266
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 value["no_html_output"] = m_no_html_output;
267 }
268
269
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 108 times.
111 if (!m_is_no_variable_dictionary_defaulted) {
270
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 value["no_variable_dictionary"] = m_no_variable_dictionary;
271 }
272
273
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 108 times.
111 if (!m_is_no_space_translation_defaulted) {
274
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 value["no_space_translation"] = m_no_space_translation;
275 }
276
277
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 111 times.
111 if (!m_is_no_space_load_instances_defaulted) {
278 ✗ value["no_space_load_instances"] = m_no_space_load_instances;
279 }
280
281
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 108 times.
111 if (!m_is_no_construction_assignment_sets_defaulted) {
282
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 value["no_construction_assignment_sets"] = m_no_construction_assignment_sets;
283 }
284
285 111 return value;
286 ✗ }
287
288 3 std::string ForwardTranslatorOptions_Impl::string() const {
289
290
1/1
✓ Branch 1 taken 3 times.
3 const Json::Value data = this->toJSON();
291
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 2 times.
3 if (data.isNull()) {
292
1/1
✓ Branch 1 taken 1 time.
2 return "";
293 }
294 // Write to string
295
1/1
✓ Branch 1 taken 2 times.
2 Json::StreamWriterBuilder wbuilder;
296 // mimic the old StyledWriter behavior:
297
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
6 wbuilder["indentation"] = " ";
298
1/1
✓ Branch 1 taken 2 times.
2 std::string result = Json::writeString(wbuilder, data);
299
300 2 return result;
301 3 }
302
303 } // namespace detail
304
305 2 ForwardTranslatorOptions::ForwardTranslatorOptions(std::shared_ptr<detail::ForwardTranslatorOptions_Impl> impl) : m_impl(std::move(impl)) {}
306 935 ForwardTranslatorOptions::ForwardTranslatorOptions() : m_impl(std::make_shared<detail::ForwardTranslatorOptions_Impl>()) {}
307
308 ✗ void ForwardTranslatorOptions::reset() {
309 ✗ m_impl->reset();
310 ✗ }
311
312 1 boost::optional<ForwardTranslatorOptions> ForwardTranslatorOptions::fromString(const std::string& s) {
313
314 // We let it fail with a warning message
315
1/1
✓ Branch 1 taken 1 time.
1 Json::CharReaderBuilder rbuilder;
316
1/1
✓ Branch 1 taken 1 time.
1 std::istringstream ss(s);
317 1 std::string formattedErrors;
318
1/1
✓ Branch 1 taken 1 time.
1 Json::Value value;
319
1/1
✓ Branch 1 taken 1 time.
1 bool parsingSuccessful = Json::parseFromStream(rbuilder, ss, &value, &formattedErrors);
320
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 if (!parsingSuccessful) {
321 ✗ LOG(Warn, "Couldn't parse ForwardTranslatorOptions from string s='" << s << "'. Error: '" << formattedErrors << "'.");
322 ✗ return boost::none;
323 }
324
325
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 return ForwardTranslatorOptions::fromJSON(value);
326 1 }
327
328 2 ForwardTranslatorOptions ForwardTranslatorOptions::fromJSON(const Json::Value& value) {
329
330 2 ForwardTranslatorOptions result;
331
332
6/9
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✓ Branch 9 taken 2 times.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
2 if (value.isMember("runcontrolspecialdays") && value["runcontrolspecialdays"].isBool()) {
333
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 result.setKeepRunControlSpecialDays(value["runcontrolspecialdays"].asBool());
334 }
335
6/9
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✓ Branch 9 taken 2 times.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
2 if (value.isMember("ip_tabular_output") && value["ip_tabular_output"].isBool()) {
336
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 result.setIPTabularOutput(value["ip_tabular_output"].asBool());
337 }
338
6/9
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✓ Branch 9 taken 2 times.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
2 if (value.isMember("no_lifecyclecosts") && value["no_lifecyclecosts"].isBool()) {
339
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 result.setExcludeLCCObjects(value["no_lifecyclecosts"].asBool());
340 }
341
6/9
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✓ Branch 9 taken 2 times.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
2 if (value.isMember("no_sqlite_output") && value["no_sqlite_output"].isBool()) {
342
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 result.setExcludeSQliteOutputReport(value["no_sqlite_output"].asBool());
343 }
344
6/9
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✓ Branch 9 taken 2 times.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
2 if (value.isMember("no_html_output") && value["no_html_output"].isBool()) {
345
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 result.setExcludeHTMLOutputReport(value["no_html_output"].asBool());
346 }
347
6/9
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✓ Branch 9 taken 2 times.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
2 if (value.isMember("no_variable_dictionary") && value["no_variable_dictionary"].isBool()) {
348
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 result.setExcludeVariableDictionary(value["no_variable_dictionary"].asBool());
349 }
350
6/9
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✓ Branch 9 taken 2 times.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
2 if (value.isMember("no_space_translation") && value["no_space_translation"].isBool()) {
351
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 result.setExcludeSpaceTranslation(value["no_space_translation"].asBool());
352 }
353
3/9
✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 6 not taken.
✗ Branch 9 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✓ Branch 14 taken 2 times.
2 if (value.isMember("no_space_load_instances") && value["no_space_load_instances"].isBool()) {
354 ✗ result.setExcludeSpaceLoadInstances(value["no_space_load_instances"].asBool());
355 }
356
6/9
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 2 times.
✓ Branch 9 taken 2 times.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
2 if (value.isMember("no_construction_assignment_sets") && value["no_construction_assignment_sets"].isBool()) {
357
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 result.setExcludeConstructionAssignmentSets(value["no_construction_assignment_sets"].asBool());
358 }
359
360 2 return result;
361 ✗ }
362
363 108 Json::Value ForwardTranslatorOptions::toJSON() const {
364 108 return m_impl->toJSON();
365 }
366
367 3 std::string ForwardTranslatorOptions::string() const {
368 3 return m_impl->string();
369 }
370
371 7 bool ForwardTranslatorOptions::isKeepRunControlSpecialDaysDefaulted() const {
372 7 return m_impl->isKeepRunControlSpecialDaysDefaulted();
373 }
374
375 911 bool ForwardTranslatorOptions::keepRunControlSpecialDays() const {
376 911 return m_impl->keepRunControlSpecialDays();
377 }
378
379 4 void ForwardTranslatorOptions::setKeepRunControlSpecialDays(bool keepRunControlSpecialDays) {
380 4 m_impl->setKeepRunControlSpecialDays(keepRunControlSpecialDays);
381 4 }
382
383 1 void ForwardTranslatorOptions::resetKeepRunControlSpecialDays() {
384 1 m_impl->resetKeepRunControlSpecialDays();
385 1 }
386
387 7 bool ForwardTranslatorOptions::isIPTabularOutputDefaulted() const {
388 7 return m_impl->isIPTabularOutputDefaulted();
389 }
390
391 861 bool ForwardTranslatorOptions::iPTabularOutput() const {
392 861 return m_impl->iPTabularOutput();
393 }
394
395 6 void ForwardTranslatorOptions::setIPTabularOutput(bool iPTabularOutput) {
396 6 m_impl->setIPTabularOutput(iPTabularOutput);
397 6 }
398
399 1 void ForwardTranslatorOptions::resetIPTabularOutput() {
400 1 m_impl->resetIPTabularOutput();
401 1 }
402
403 7 bool ForwardTranslatorOptions::isExcludeLCCObjectsDefaulted() const {
404 7 return m_impl->isExcludeLCCObjectsDefaulted();
405 }
406
407 1747 bool ForwardTranslatorOptions::excludeLCCObjects() const {
408 1747 return m_impl->excludeLCCObjects();
409 }
410
411 7 void ForwardTranslatorOptions::setExcludeLCCObjects(bool excludeLCCObjects) {
412 7 m_impl->setExcludeLCCObjects(excludeLCCObjects);
413 7 }
414
415 1 void ForwardTranslatorOptions::resetExcludeLCCObjects() {
416 1 m_impl->resetExcludeLCCObjects();
417 1 }
418
419 7 bool ForwardTranslatorOptions::isExcludeSQliteOutputReportDefaulted() const {
420 7 return m_impl->isExcludeSQliteOutputReportDefaulted();
421 }
422
423 877 bool ForwardTranslatorOptions::excludeSQliteOutputReport() const {
424 877 return m_impl->excludeSQliteOutputReport();
425 }
426
427 6 void ForwardTranslatorOptions::setExcludeSQliteOutputReport(bool excludeSQliteOutputReport) {
428 6 m_impl->setExcludeSQliteOutputReport(excludeSQliteOutputReport);
429 6 }
430
431 1 void ForwardTranslatorOptions::resetExcludeSQliteOutputReport() {
432 1 m_impl->resetExcludeSQliteOutputReport();
433 1 }
434
435 6 bool ForwardTranslatorOptions::isExcludeHTMLOutputReportDefaulted() const {
436 6 return m_impl->isExcludeHTMLOutputReportDefaulted();
437 }
438
439 1747 bool ForwardTranslatorOptions::excludeHTMLOutputReport() const {
440 1747 return m_impl->excludeHTMLOutputReport();
441 }
442
443 6 void ForwardTranslatorOptions::setExcludeHTMLOutputReport(bool excludeHTMLOutputReport) {
444 6 m_impl->setExcludeHTMLOutputReport(excludeHTMLOutputReport);
445 6 }
446
447 1 void ForwardTranslatorOptions::resetExcludeHTMLOutputReport() {
448 1 m_impl->resetExcludeHTMLOutputReport();
449 1 }
450
451 6 bool ForwardTranslatorOptions::isExcludeVariableDictionaryDefaulted() const {
452 6 return m_impl->isExcludeVariableDictionaryDefaulted();
453 }
454
455 877 bool ForwardTranslatorOptions::excludeVariableDictionary() const {
456 877 return m_impl->excludeVariableDictionary();
457 }
458
459 5 void ForwardTranslatorOptions::setExcludeVariableDictionary(bool excludeVariableDictionary) {
460 5 m_impl->setExcludeVariableDictionary(excludeVariableDictionary);
461 5 }
462
463 1 void ForwardTranslatorOptions::resetExcludeVariableDictionary() {
464 1 m_impl->resetExcludeVariableDictionary();
465 1 }
466
467 6 bool ForwardTranslatorOptions::isExcludeSpaceTranslationDefaulted() const {
468 6 return m_impl->isExcludeSpaceTranslationDefaulted();
469 }
470
471 7308 bool ForwardTranslatorOptions::excludeSpaceTranslation() const {
472 7308 return m_impl->excludeSpaceTranslation();
473 }
474
475 125 void ForwardTranslatorOptions::setExcludeSpaceTranslation(bool excludeSpaceTranslation) {
476 125 m_impl->setExcludeSpaceTranslation(excludeSpaceTranslation);
477 125 }
478
479 1 void ForwardTranslatorOptions::resetExcludeSpaceTranslation() {
480 1 m_impl->resetExcludeSpaceTranslation();
481 1 }
482
483 6 bool ForwardTranslatorOptions::isExcludeSpaceLoadInstancesDefaulted() const {
484 6 return m_impl->isExcludeSpaceLoadInstancesDefaulted();
485 }
486
487 706 bool ForwardTranslatorOptions::excludeSpaceLoadInstances() const {
488 706 return m_impl->excludeSpaceLoadInstances();
489 }
490
491 68 void ForwardTranslatorOptions::setExcludeSpaceLoadInstances(bool excludeSpaceLoadInstances) {
492 68 m_impl->setExcludeSpaceLoadInstances(excludeSpaceLoadInstances);
493 68 }
494
495 1 void ForwardTranslatorOptions::resetExcludeSpaceLoadInstances() {
496 1 m_impl->resetExcludeSpaceLoadInstances();
497 1 }
498
499 6 bool ForwardTranslatorOptions::isExcludeConstructionAssignmentSetsDefaulted() const {
500 6 return m_impl->isExcludeConstructionAssignmentSetsDefaulted();
501 }
502
503 4213 bool ForwardTranslatorOptions::excludeConstructionAssignmentSets() const {
504 4213 return m_impl->excludeConstructionAssignmentSets();
505 }
506
507 7 void ForwardTranslatorOptions::setExcludeConstructionAssignmentSets(bool excludeConstructionAssignmentSets) {
508 7 m_impl->setExcludeConstructionAssignmentSets(excludeConstructionAssignmentSets);
509 7 }
510
511 1 void ForwardTranslatorOptions::resetExcludeConstructionAssignmentSets() {
512 1 m_impl->resetExcludeConstructionAssignmentSets();
513 1 }
514
515 1 void ForwardTranslatorOptions::overrideValuesWith(const ForwardTranslatorOptions& other) {
516 1 m_impl->overrideValuesWith(other);
517 1 }
518
519 ✗ std::ostream& operator<<(std::ostream& os, const ForwardTranslatorOptions& forwardTranslatorOptions) {
520 ✗ os << forwardTranslatorOptions.string();
521 ✗ return os;
522 }
523
524 ✗ std::vector<ForwardTranslatorOptionKeyMethod> ForwardTranslatorOptions::forwardTranslatorOptionKeyMethods() {
525 return std::vector<ForwardTranslatorOptionKeyMethod>{{{"runcontrolspecialdays", "setKeepRunControlSpecialDays"},
526 {"ip_tabular_output", "setIPTabularOutput"},
527 {"no_lifecyclecosts", "setExcludeLCCObjects"},
528 {"no_sqlite_output", "setExcludeSQliteOutputReport"},
529 {"no_html_output", "setExcludeHTMLOutputReport"},
530 {"no_variable_dictionary", "setExcludeVariableDictionary"},
531 {"no_space_translation", "setExcludeSpaceTranslation"},
532 {"no_space_load_instances", "setExcludeSpaceLoadInstances"},
533 ✗ {"no_construction_assignment_sets", "setExcludeConstructionAssignmentSets"}}};
534 ✗ }
535
536 ✗ std::ostream& operator<<(std::ostream& out, const ForwardTranslatorOptionKeyMethod& opt) {
537 ✗ out << "(" << opt.json_name << ", " << opt.ft_method_name << ")";
538 ✗ return out;
539 }
540
541 } // namespace openstudio
542