GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 85.4% 170 / 0 / 199
Functions: 88.7% 47 / 0 / 53
Branches: 71.4% 195 / 0 / 273

src/model/OutputTableAnnual.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 "OutputTableAnnual.hpp"
7 #include "OutputTableAnnual_Impl.hpp"
8
9 #include "ModelExtensibleGroup.hpp"
10
11 #include "Schedule.hpp"
12 #include "Schedule_Impl.hpp"
13 #include "ScheduleTypeLimits.hpp"
14 #include "ScheduleTypeRegistry.hpp"
15
16 #include "../utilities/core/Assert.hpp"
17
18 #include <utilities/idd/IddEnums.hxx>
19 #include <utilities/idd/IddFactory.hxx>
20 #include <utilities/idd/OS_Output_Table_Annual_FieldEnums.hxx>
21 #include <fmt/format.h>
22 #include <fmt/ranges.h>
23
24 namespace openstudio {
25 namespace model {
26
27 53 AnnualVariableGroup::AnnualVariableGroup(std::string variableorMeterorEMSVariableorField, std::string aggregationType, int digitsAfterDecimal)
28 53 : m_variableorMeterorEMSVariableorField(std::move(variableorMeterorEMSVariableorField)),
29 53 m_aggregationType(std::move(aggregationType)),
30 53 m_digitsAfterDecimal(digitsAfterDecimal) {
31
2/2
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 52 times.
53 if (m_variableorMeterorEMSVariableorField.empty()) {
32
13/13
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 25 taken 1 time.
✓ Branch 28 taken 1 time.
✓ Branch 31 taken 1 time.
✓ Branch 34 taken 1 time.
✓ Branch 38 taken 1 time.
✓ Branch 41 taken 1 time.
1 LOG_AND_THROW("Variable or Meter or EMSVariable or Field Name can't be empty");
33 }
34
3/3
✓ Branch 1 taken 52 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 51 times.
52 if (!OutputTableAnnual::isAggregationTypeValid(m_aggregationType)) {
35
15/15
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 8 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 25 taken 1 time.
✓ Branch 28 taken 1 time.
✓ Branch 31 taken 1 time.
✓ Branch 34 taken 1 time.
✓ Branch 37 taken 1 time.
✓ Branch 40 taken 1 time.
✓ Branch 44 taken 1 time.
✓ Branch 50 taken 1 time.
✓ Branch 53 taken 1 time.
3 LOG_AND_THROW(fmt::format("Invalid aggregation type '{}': {}", m_aggregationType, OutputTableAnnual::aggregationTypeValues()));
36 }
37 55 }
38
39 73 std::string AnnualVariableGroup::variableorMeterorEMSVariableorField() const {
40 73 return m_variableorMeterorEMSVariableorField;
41 }
42
43 60 std::string AnnualVariableGroup::aggregationType() const {
44 60 return m_aggregationType;
45 }
46
47 38 int AnnualVariableGroup::digitsAfterDecimal() const {
48 38 return m_digitsAfterDecimal;
49 }
50
51 16 bool AnnualVariableGroup::isAggregationTypeAdvanced() const {
52 16 return OutputTableAnnual::isAggregationTypeAdvanced(m_aggregationType);
53 }
54
55 18 bool AnnualVariableGroup::operator==(const AnnualVariableGroup& other) const {
56
1/6
✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
18 return openstudio::istringEqual(variableorMeterorEMSVariableorField(), other.variableorMeterorEMSVariableorField())
57
15/20
✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✓ Branch 7 taken 18 times.
✓ Branch 9 taken 11 times.
✓ Branch 10 taken 7 times.
✓ Branch 12 taken 11 times.
✓ Branch 15 taken 11 times.
✓ Branch 18 taken 11 times.
✓ Branch 20 taken 6 times.
✓ Branch 21 taken 5 times.
✓ Branch 22 taken 11 times.
✓ Branch 23 taken 7 times.
✓ Branch 25 taken 11 times.
✓ Branch 26 taken 7 times.
✓ Branch 28 taken 18 times.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
36 && openstudio::istringEqual(aggregationType(), other.aggregationType());
58 }
59
60 ✗ bool AnnualVariableGroup::operator!=(const AnnualVariableGroup& other) const {
61 ✗ return (!operator==(other));
62 }
63
64 4 std::ostream& operator<<(std::ostream& out, const openstudio::model::AnnualVariableGroup& annualVariableGroup) {
65 ✗ out << "(Output Variable or Meter = '" << annualVariableGroup.variableorMeterorEMSVariableorField() << "', Aggregation Type = '"
66
9/9
✓ Branch 2 taken 4 times.
✓ Branch 5 taken 4 times.
✓ Branch 8 taken 4 times.
✓ Branch 11 taken 4 times.
✓ Branch 14 taken 4 times.
✓ Branch 17 taken 4 times.
✓ Branch 20 taken 4 times.
✓ Branch 23 taken 4 times.
✓ Branch 26 taken 4 times.
4 << annualVariableGroup.aggregationType() << "', Digits After Decimal = " << annualVariableGroup.digitsAfterDecimal() << ")";
67 4 return out;
68 }
69
70 namespace detail {
71
72 5 OutputTableAnnual_Impl::OutputTableAnnual_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
73 5 : ModelObject_Impl(idfObject, model, keepHandle) {
74
4/6
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 5 times.
✗ Branch 13 not taken.
5 OS_ASSERT(idfObject.iddObject().type() == OutputTableAnnual::iddObjectType());
75 5 }
76
77 ✗ OutputTableAnnual_Impl::OutputTableAnnual_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
78 ✗ : ModelObject_Impl(other, model, keepHandle) {
79 ✗ OS_ASSERT(other.iddObject().type() == OutputTableAnnual::iddObjectType());
80 ✗ }
81
82 2 OutputTableAnnual_Impl::OutputTableAnnual_Impl(const OutputTableAnnual_Impl& other, Model_Impl* model, bool keepHandle)
83 2 : ModelObject_Impl(other, model, keepHandle) {}
84
85 ✗ const std::vector<std::string>& OutputTableAnnual_Impl::outputVariableNames() const {
86 ✗ static std::vector<std::string> result;
87 ✗ if (result.empty()) {
88 }
89 ✗ return result;
90 }
91
92 ✗ IddObjectType OutputTableAnnual_Impl::iddObjectType() const {
93 ✗ return OutputTableAnnual::iddObjectType();
94 }
95
96 ✗ std::vector<ScheduleTypeKey> OutputTableAnnual_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
97 ✗ std::vector<ScheduleTypeKey> result;
98 ✗ const UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
99 ✗ if (std::find(fieldIndices.cbegin(), fieldIndices.cend(), OS_Output_Table_AnnualFields::ScheduleName) != fieldIndices.cend()) {
100 ✗ result.emplace_back("OutputTableAnnual", "Output Table Annual");
101 }
102 ✗ return result;
103 ✗ }
104
105 7 boost::optional<std::string> OutputTableAnnual_Impl::filter() const {
106 7 return getString(OS_Output_Table_AnnualFields::Filter, true, true);
107 }
108
109 7 boost::optional<Schedule> OutputTableAnnual_Impl::schedule() const {
110
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Output_Table_AnnualFields::ScheduleName);
111 }
112
113 3 bool OutputTableAnnual_Impl::setFilter(const std::string& filter) {
114 3 const bool result = setString(OS_Output_Table_AnnualFields::Filter, filter);
115
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
116 3 return result;
117 }
118
119 1 void OutputTableAnnual_Impl::resetFilter() {
120
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 const bool result = setString(OS_Output_Table_AnnualFields::Filter, "");
121
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
122 1 }
123
124 3 bool OutputTableAnnual_Impl::setSchedule(Schedule& schedule) {
125 const bool result =
126
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
12 ModelObject_Impl::setSchedule(OS_Output_Table_AnnualFields::ScheduleName, "OutputTableAnnual", "Output Table Annual", schedule);
127 3 return result;
128 }
129
130 1 void OutputTableAnnual_Impl::resetSchedule() {
131
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 const bool result = setString(OS_Output_Table_AnnualFields::ScheduleName, "");
132
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
133 1 }
134
135 97 unsigned int OutputTableAnnual_Impl::numberofAnnualVariableGroups() const {
136 97 return numExtensibleGroups();
137 }
138
139 17 std::vector<AnnualVariableGroup> OutputTableAnnual_Impl::annualVariableGroups() const {
140 17 std::vector<AnnualVariableGroup> result;
141
142
3/3
✓ Branch 1 taken 42 times.
✓ Branch 3 taken 25 times.
✓ Branch 4 taken 17 times.
42 for (unsigned i = 0; i < numberofAnnualVariableGroups(); ++i) {
143
144
1/1
✓ Branch 1 taken 25 times.
25 boost::optional<AnnualVariableGroup> group_ = getAnnualVariableGroup(i);
145
146 // getAnnualVariableGroup is responsible for handling error and issuing Error log messages.
147 // Here we add it to the result array if it worked, and if it didn't, we keep going
148 // We just issue a message about index so user can delete it easily
149
1/2
✓ Branch 0 taken 25 times.
✗ Branch 1 not taken.
25 if (group_) {
150
2/2
✓ Branch 1 taken 25 times.
✓ Branch 5 taken 25 times.
25 result.push_back(std::move(*group_));
151 } else {
152 ✗ LOG(Error, briefDescription() << " has an invalid AnnualVariableGroup group at index " << i);
153 }
154 25 }
155
156 17 return result;
157 ✗ }
158
159 14 boost::optional<unsigned> OutputTableAnnual_Impl::annualVariableGroupIndex(const AnnualVariableGroup& annualVariableGroup) const {
160
1/1
✓ Branch 1 taken 14 times.
14 const std::vector<AnnualVariableGroup> groups = annualVariableGroups();
161
1/1
✓ Branch 3 taken 14 times.
14 auto it = std::find(groups.cbegin(), groups.cend(), annualVariableGroup);
162
2/2
✓ Branch 2 taken 3 times.
✓ Branch 3 taken 11 times.
14 if (it != groups.end()) {
163
1/1
✓ Branch 2 taken 3 times.
6 return static_cast<unsigned>(std::distance(groups.cbegin(), it));
164 }
165 11 return boost::none;
166 14 }
167
168 35 boost::optional<AnnualVariableGroup> OutputTableAnnual_Impl::getAnnualVariableGroup(unsigned groupIndex) const {
169
3/3
✓ Branch 1 taken 35 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 34 times.
35 if (groupIndex >= numberofAnnualVariableGroups()) {
170
13/13
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 25 taken 1 time.
✓ Branch 28 taken 1 time.
✓ Branch 32 taken 1 time.
✓ Branch 35 taken 1 time.
✓ Branch 38 taken 1 time.
1 LOG(Error, "Asked to get AnnualVariableGroup with index " << groupIndex << ", but " << briefDescription() << " has just "
171 << numberofAnnualVariableGroups() << " AnnualVariableGroups.");
172 1 return boost::none;
173 }
174
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
34 auto group = getExtensibleGroup(groupIndex).cast<ModelExtensibleGroup>();
175
176 boost::optional<std::string> variableorMeterorEMSVariableorField_ =
177
1/1
✓ Branch 1 taken 34 times.
34 group.getString(OS_Output_Table_AnnualExtensibleFields::VariableorMeterorEMSVariableorFieldName);
178
1/1
✓ Branch 1 taken 34 times.
34 boost::optional<std::string> aggregationType_ = group.getString(OS_Output_Table_AnnualExtensibleFields::AggregationTypeforVariableorMeter);
179
2/2
✓ Branch 1 taken 34 times.
✓ Branch 4 taken 34 times.
34 int digitsAfterDecimal = group.getInt(OS_Output_Table_AnnualExtensibleFields::DigitsAfterDecimal).value_or(2);
180
181
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 34 times.
34 if (!variableorMeterorEMSVariableorField_) {
182 ✗ LOG(Error, "Could not retrieve VariableorMeterName_ for extensible group " << group.groupIndex() << ".");
183 ✗ return boost::none;
184 }
185
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 34 times.
34 if (!aggregationType_) {
186 ✗ LOG(Error, "Could not retrieve Aggregation Type for extensible group " << group.groupIndex() << ".");
187 ✗ return boost::none;
188 }
189
190
4/4
✓ Branch 1 taken 34 times.
✓ Branch 6 taken 34 times.
✓ Branch 11 taken 34 times.
✓ Branch 14 taken 34 times.
34 return {AnnualVariableGroup(std::move(*variableorMeterorEMSVariableorField_), std::move(*aggregationType_), digitsAfterDecimal)};
191 34 }
192
193 16 bool OutputTableAnnual_Impl::addAnnualVariableGroup(const AnnualVariableGroup& annualVariableGroup) {
194 16 boost::optional<unsigned> existingIndex_;
195
3/3
✓ Branch 1 taken 16 times.
✓ Branch 3 taken 12 times.
✓ Branch 4 taken 4 times.
16 if (!annualVariableGroup.isAggregationTypeAdvanced()) {
196
1/1
✓ Branch 1 taken 12 times.
12 existingIndex_ = annualVariableGroupIndex(annualVariableGroup);
197
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 10 times.
12 if (existingIndex_) {
198
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 boost::optional<AnnualVariableGroup> group_ = getAnnualVariableGroup(existingIndex_.get());
199
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
2 OS_ASSERT(group_);
200
13/13
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 13 taken 2 times.
✓ Branch 16 taken 2 times.
✓ Branch 19 taken 2 times.
✓ Branch 22 taken 2 times.
✓ Branch 25 taken 2 times.
✓ Branch 28 taken 2 times.
✓ Branch 32 taken 2 times.
✓ Branch 35 taken 2 times.
✓ Branch 38 taken 2 times.
2 LOG(Warn, "For " << briefDescription()
201 << ", AnnualVariableGroup already exists and is not an Advanced Aggregation Type, will be modified in place from "
202 << group_.get() << " to " << annualVariableGroup << ".");
203 2 }
204 }
205
206 // If existing, get it, otherwise Push an extensible group. ModelExtensibleGroup cannot be default-constructed, so use a ternary operator
207
7/9
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 14 times.
✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
✓ Branch 10 taken 14 times.
✓ Branch 12 taken 14 times.
✓ Branch 13 taken 2 times.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
16 IdfExtensibleGroup eg = (existingIndex_ ? getExtensibleGroup(existingIndex_.get()) : pushExtensibleGroup({}, false));
208
1/1
✓ Branch 1 taken 16 times.
16 eg.setString(OS_Output_Table_AnnualExtensibleFields::VariableorMeterorEMSVariableorFieldName,
209
1/1
✓ Branch 1 taken 16 times.
32 annualVariableGroup.variableorMeterorEMSVariableorField());
210
2/2
✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
16 eg.setString(OS_Output_Table_AnnualExtensibleFields::AggregationTypeforVariableorMeter, annualVariableGroup.aggregationType());
211
2/2
✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
16 eg.setInt(OS_Output_Table_AnnualExtensibleFields::DigitsAfterDecimal, annualVariableGroup.digitsAfterDecimal());
212 16 return true;
213 16 }
214
215 2 bool OutputTableAnnual_Impl::addAnnualVariableGroups(const std::vector<AnnualVariableGroup>& annualVariableGroups) {
216 2 bool result = true;
217
218
2/2
✓ Branch 5 taken 5 times.
✓ Branch 6 taken 2 times.
7 for (const auto& annualVariableGroup : annualVariableGroups) {
219
1/1
✓ Branch 1 taken 5 times.
5 bool thisResult = addAnnualVariableGroup(annualVariableGroup);
220 // cppcheck-suppress knownConditionTrueFalse
221
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
5 if (!thisResult) {
222 ✗ LOG(Error, "Could not add AnnualVariableGroup " << annualVariableGroup << " to " << briefDescription() << ". Continuing with others.");
223 // OS_ASSERT(false);
224 // result = false;
225 }
226 }
227
228 2 return result;
229 }
230
231 3 bool OutputTableAnnual_Impl::removeAnnualVariableGroup(unsigned groupIndex) {
232 3 bool result = false;
233
234 3 unsigned int num = numberofAnnualVariableGroups();
235
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 2 times.
3 if (groupIndex < num) {
236
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 getObject<ModelObject>().eraseExtensibleGroup(groupIndex);
237 1 result = true;
238 }
239 3 return result;
240 }
241
242 1 void OutputTableAnnual_Impl::removeAllAnnualVariableGroups() {
243
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 getObject<ModelObject>().clearExtensibleGroups();
244 1 }
245
246 } // namespace detail
247
248 5 OutputTableAnnual::OutputTableAnnual(const Model& model) : ModelObject(OutputTableAnnual::iddObjectType(), model) {
249
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 5 times.
✗ Branch 5 not taken.
5 OS_ASSERT(getImpl<detail::OutputTableAnnual_Impl>());
250 5 }
251
252 57 std::vector<std::string> OutputTableAnnual::aggregationTypeValues() {
253
5/5
✓ Branch 1 taken 57 times.
✓ Branch 4 taken 57 times.
✓ Branch 7 taken 57 times.
✓ Branch 10 taken 57 times.
✓ Branch 13 taken 57 times.
57 IddObject obj = IddFactory::instance().getObject(iddObjectType()).get();
254 // Return IddKeyNames in extensible portion
255
2/2
✓ Branch 1 taken 57 times.
✓ Branch 4 taken 57 times.
114 return getIddKeyNames(obj, obj.numFields() + OS_Output_Table_AnnualExtensibleFields::AggregationTypeforVariableorMeter);
256 57 }
257
258 ✗ std::vector<std::string> OutputTableAnnual::validAggregationTypes() {
259 ✗ return aggregationTypeValues();
260 }
261
262 55 bool OutputTableAnnual::isAggregationTypeValid(const std::string& aggregationType) {
263
1/1
✓ Branch 1 taken 55 times.
55 const auto vals = aggregationTypeValues();
264
1/1
✓ Branch 3 taken 55 times.
55 return std::find_if(vals.cbegin(), vals.cend(),
265 136 [&aggregationType](const std::string& choice) { return openstudio::istringEqual(aggregationType, choice); })
266 165 != vals.cend();
267 55 }
268
269 18 bool OutputTableAnnual::isAggregationTypeAdvanced(const std::string& aggregationType) {
270 18 auto const& vals = advancedAggregationTypes();
271
1/1
✓ Branch 3 taken 18 times.
18 return std::find_if(vals.cbegin(), vals.cend(),
272 57 [&aggregationType](const std::string& choice) { return openstudio::istringEqual(aggregationType, choice); })
273 36 != vals.cend();
274 }
275
276 18 const std::vector<std::string>& OutputTableAnnual::advancedAggregationTypes() {
277
3/4
✓ Branch 0 taken 4 times.
✓ Branch 1 taken 14 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
18 static std::vector<std::string> result;
278
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 14 times.
18 if (result.empty()) {
279
2/4
✓ Branch 0 taken 16 times.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
20 result = {"ValueWhenMaximumOrMinimum", "SumOrAverageDuringHoursShown", "MaximumDuringHoursShown", "MinimumDuringHoursShown"};
280 }
281 18 return result;
282 12 }
283
284 7796 IddObjectType OutputTableAnnual::iddObjectType() {
285
1/1
✓ Branch 1 taken 7796 times.
7796 return {IddObjectType::OS_Output_Table_Annual};
286 }
287
288 7 boost::optional<std::string> OutputTableAnnual::filter() const {
289
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::OutputTableAnnual_Impl>()->filter();
290 }
291
292 7 boost::optional<Schedule> OutputTableAnnual::schedule() const {
293
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::OutputTableAnnual_Impl>()->schedule();
294 }
295
296 3 bool OutputTableAnnual::setFilter(const std::string& filter) {
297
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::OutputTableAnnual_Impl>()->setFilter(filter);
298 }
299
300 1 void OutputTableAnnual::resetFilter() {
301
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::OutputTableAnnual_Impl>()->resetFilter();
302 1 }
303
304 3 bool OutputTableAnnual::setSchedule(Schedule& schedule) {
305
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::OutputTableAnnual_Impl>()->setSchedule(schedule);
306 }
307
308 1 void OutputTableAnnual::resetSchedule() {
309
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::OutputTableAnnual_Impl>()->resetSchedule();
310 1 }
311
312 3 std::vector<AnnualVariableGroup> OutputTableAnnual::annualVariableGroups() const {
313
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::OutputTableAnnual_Impl>()->annualVariableGroups();
314 }
315
316 16 unsigned int OutputTableAnnual::numberofAnnualVariableGroups() const {
317
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::OutputTableAnnual_Impl>()->numberofAnnualVariableGroups();
318 }
319
320 2 boost::optional<unsigned> OutputTableAnnual::annualVariableGroupIndex(const AnnualVariableGroup& annualVariableGroup) const {
321
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::OutputTableAnnual_Impl>()->annualVariableGroupIndex(annualVariableGroup);
322 }
323
324 8 boost::optional<AnnualVariableGroup> OutputTableAnnual::getAnnualVariableGroup(unsigned groupIndex) const {
325
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::OutputTableAnnual_Impl>()->getAnnualVariableGroup(groupIndex);
326 }
327
328 11 bool OutputTableAnnual::addAnnualVariableGroup(const AnnualVariableGroup& annualVariableGroup) {
329
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::OutputTableAnnual_Impl>()->addAnnualVariableGroup(annualVariableGroup);
330 }
331
332 4 bool OutputTableAnnual::addAnnualVariableGroup(std::string variableorMeterorEMSVariableorField, std::string aggregationType,
333 int digitsAfterDecimal) {
334
1/1
✓ Branch 1 taken 4 times.
4 return addAnnualVariableGroup(
335
1/1
✓ Branch 5 taken 4 times.
8 AnnualVariableGroup(std::move(variableorMeterorEMSVariableorField), std::move(aggregationType), digitsAfterDecimal));
336 }
337
338 2 bool OutputTableAnnual::addAnnualVariableGroups(const std::vector<AnnualVariableGroup>& annualVariableGroups) {
339
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::OutputTableAnnual_Impl>()->addAnnualVariableGroups(annualVariableGroups);
340 }
341
342 3 bool OutputTableAnnual::removeAnnualVariableGroup(unsigned groupIndex) {
343
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::OutputTableAnnual_Impl>()->removeAnnualVariableGroup(groupIndex);
344 }
345
346 1 void OutputTableAnnual::removeAllAnnualVariableGroups() {
347
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::OutputTableAnnual_Impl>()->removeAllAnnualVariableGroups();
348 1 }
349
350 /// @cond
351
1/1
✓ Branch 3 taken 3 times.
3 OutputTableAnnual::OutputTableAnnual(std::shared_ptr<detail::OutputTableAnnual_Impl> impl) : ModelObject(std::move(impl)) {}
352 /// @endcond
353
354 } // namespace model
355 } // namespace openstudio
356