GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 0 / 1
Functions: 100.0% 1 / 0 / 1
Branches: -% 0 / 0 / 0

src/model/OutputVariable_Impl.hpp
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 #ifndef MODEL_OUTPUTVARIABLE_IMPL_HPP
7 #define MODEL_OUTPUTVARIABLE_IMPL_HPP
8
9 #include "ModelObject_Impl.hpp"
10
11 namespace openstudio {
12
13 class ReportingFrequency;
14
15 namespace model {
16
17 class Schedule;
18
19 namespace detail {
20
21 class MODEL_API OutputVariable_Impl : public ModelObject_Impl
22 {
23
24 public:
25 /** @name Constructors and Destructors */
26 //@{
27
28 // constructor
29 OutputVariable_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
30
31 // construct from workspace
32 OutputVariable_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
33
34 // copy constructor
35 OutputVariable_Impl(const OutputVariable_Impl& other, Model_Impl* model, bool keepHandle);
36
37 // virtual destructor
38 1747 virtual ~OutputVariable_Impl() override = default;
39
40 //@}
41 /** @name Virtual Methods */
42 //@{
43
44 // Get all output variable names that could be associated with this object.
45 virtual const std::vector<std::string>& outputVariableNames() const override;
46
47 virtual IddObjectType iddObjectType() const override;
48
49 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
50
51 virtual std::vector<openstudio::IdfObject> remove() override;
52
53 //@}
54 /** @name Getters */
55 //@{
56
57 std::string keyValue() const;
58
59 bool isKeyValueDefaulted() const;
60
61 std::string variableName() const;
62
63 std::string reportingFrequency() const;
64
65 bool isReportingFrequencyDefaulted() const;
66
67 std::vector<std::string> reportingFrequencyValues() const;
68
69 boost::optional<Schedule> schedule() const;
70
71 bool exportToBCVTB() const;
72
73 bool isExportToBCVTBDefaulted() const;
74
75 //@}
76 /** @name Setters */
77 //@{
78
79 bool setKeyValue(const std::string& keyValue);
80
81 void resetKeyValue();
82
83 bool setVariableName(const std::string& variableName);
84
85 bool setReportingFrequency(const std::string& reportingFrequency);
86
87 void resetReportingFrequency();
88
89 bool setSchedule(Schedule& schedule);
90
91 void resetSchedule();
92
93 bool setExportToBCVTB(bool exportToBCVTB);
94
95 void resetExportToBCVTB();
96
97 //@}
98 private:
99 REGISTER_LOGGER("openstudio.model.OutputVariable");
100
101 boost::optional<ModelObject> scheduleAsModelObject() const;
102
103 bool setScheduleAsModelObject(const boost::optional<ModelObject>& modelObject);
104 };
105
106 } // namespace detail
107
108 } // namespace model
109 } // namespace openstudio
110
111 #endif // MODEL_OUTPUTVARIABLE_IMPL_HPP
112