GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 74.4% 29 / 0 / 39
Functions: 81.2% 13 / 0 / 16
Branches: 50.0% 12 / 0 / 24

src/model/OutputDebuggingData.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 "OutputDebuggingData.hpp"
7 #include "OutputDebuggingData_Impl.hpp"
8
9 #include "Model.hpp"
10 #include "Model_Impl.hpp"
11
12 #include <utilities/idd/IddEnums.hxx>
13 #include <utilities/idd/OS_Output_DebuggingData_FieldEnums.hxx>
14
15 #include "../utilities/core/Assert.hpp"
16
17 namespace openstudio {
18 namespace model {
19
20 namespace detail {
21
22 6 OutputDebuggingData_Impl::OutputDebuggingData_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
23 6 : ModelObject_Impl(idfObject, model, keepHandle) {
24
4/6
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 6 times.
✗ Branch 13 not taken.
6 OS_ASSERT(idfObject.iddObject().type() == OutputDebuggingData::iddObjectType());
25 6 }
26
27 ✗ OutputDebuggingData_Impl::OutputDebuggingData_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
28 ✗ : ModelObject_Impl(other, model, keepHandle) {
29 ✗ OS_ASSERT(other.iddObject().type() == OutputDebuggingData::iddObjectType());
30 ✗ }
31
32 4 OutputDebuggingData_Impl::OutputDebuggingData_Impl(const OutputDebuggingData_Impl& other, Model_Impl* model, bool keepHandle)
33 4 : ModelObject_Impl(other, model, keepHandle) {}
34
35 ✗ const std::vector<std::string>& OutputDebuggingData_Impl::outputVariableNames() const {
36 ✗ static const std::vector<std::string> result;
37 ✗ if (result.empty()) {
38 }
39 ✗ return result;
40 }
41
42 ✗ IddObjectType OutputDebuggingData_Impl::iddObjectType() const {
43 ✗ return OutputDebuggingData::iddObjectType();
44 }
45
46 6 bool OutputDebuggingData_Impl::reportDebuggingData() const {
47 6 return getBooleanFieldValue(OS_Output_DebuggingDataFields::ReportDebuggingData);
48 }
49
50 6 bool OutputDebuggingData_Impl::reportDuringWarmup() const {
51 6 return getBooleanFieldValue(OS_Output_DebuggingDataFields::ReportDuringWarmup);
52 }
53
54 12 bool OutputDebuggingData_Impl::setReportDebuggingData(bool reportDebuggingData) {
55 12 return setBooleanFieldValue(OS_Output_DebuggingDataFields::ReportDebuggingData, reportDebuggingData);
56 }
57
58 12 bool OutputDebuggingData_Impl::setReportDuringWarmup(bool reportDuringWarmup) {
59 12 return setBooleanFieldValue(OS_Output_DebuggingDataFields::ReportDuringWarmup, reportDuringWarmup);
60 }
61
62 } // namespace detail
63
64 7755 IddObjectType OutputDebuggingData::iddObjectType() {
65
1/1
✓ Branch 1 taken 7755 times.
7755 return {IddObjectType::OS_Output_DebuggingData};
66 }
67
68 6 bool OutputDebuggingData::reportDebuggingData() const {
69
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::OutputDebuggingData_Impl>()->reportDebuggingData();
70 }
71
72 6 bool OutputDebuggingData::reportDuringWarmup() const {
73
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::OutputDebuggingData_Impl>()->reportDuringWarmup();
74 }
75
76 12 bool OutputDebuggingData::setReportDebuggingData(bool reportDebuggingData) {
77
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::OutputDebuggingData_Impl>()->setReportDebuggingData(reportDebuggingData);
78 }
79
80 12 bool OutputDebuggingData::setReportDuringWarmup(bool reportDuringWarmup) {
81
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::OutputDebuggingData_Impl>()->setReportDuringWarmup(reportDuringWarmup);
82 }
83
84 /// @cond
85
1/1
✓ Branch 2 taken 9 times.
9 OutputDebuggingData::OutputDebuggingData(std::shared_ptr<detail::OutputDebuggingData_Impl> impl) : ModelObject(impl) {}
86 6 OutputDebuggingData::OutputDebuggingData(Model& model) : ModelObject(OutputDebuggingData::iddObjectType(), model) {
87
1/1
✓ Branch 1 taken 6 times.
6 setReportDebuggingData(false);
88
1/1
✓ Branch 1 taken 6 times.
6 setReportDuringWarmup(false);
89 6 }
90
91 /// @endcond
92
93 } // namespace model
94 } // namespace openstudio
95