GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 58.3% 7 / 0 / 12
Functions: 58.3% 7 / 0 / 12
Branches: 31.8% 7 / 0 / 22

src/model/DefaultScheduleSet.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_DEFAULTSCHEDULESET_HPP
7 #define MODEL_DEFAULTSCHEDULESET_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ResourceObject.hpp"
11
12 #include "../utilities/core/Enum.hpp"
13
14 namespace openstudio {
15 namespace model {
16
17 class Schedule;
18
19 namespace detail {
20
21 class DefaultScheduleSet_Impl;
22
23 } // namespace detail
24
25 // clang-format off
26
27
7/22
openstudio::model::DefaultScheduleType::buildStringVec[abi:cxx11](bool):
✗ Branch 0 not taken.
✓ Branch 1 taken 1584 times.
✗ Branch 3 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 12 not taken.
✓ Branch 17 taken 1584 times.
✓ Branch 20 taken 1584 times.
✓ Branch 23 taken 1584 times.
✓ Branch 24 taken 132 times.
✗ Branch 25 not taken.
✓ Branch 26 taken 132 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 132 times.
openstudio::model::DefaultScheduleType::enumName[abi:cxx11]():
✗ Branch 1 not taken.
openstudio::model::operator<<(std::ostream&, openstudio::model::DefaultScheduleType const&):
✗ Branch 1 not taken.
✗ Branch 4 not taken.
✗ Branch 7 not taken.
✗ Branch 10 not taken.
✗ Branch 13 not taken.
✗ Branch 16 not taken.
3637 OPENSTUDIO_ENUM(DefaultScheduleType,
28 ((HoursofOperationSchedule)(Hours of Operation Schedule)(1))
29 ((NumberofPeopleSchedule)(Number of People Schedule)(2))
30 ((PeopleActivityLevelSchedule)(People Activity Level Schedule)(3))
31 ((LightingSchedule)(Lighting Schedule)(4))
32 ((ElectricEquipmentSchedule)(Electric Equipment Schedule)(5))
33 ((GasEquipmentSchedule)(Gas Equipment Schedule)(6))
34 ((HotWaterEquipmentSchedule)(Hot Water Equipment Schedule)(7))
35 ((InfiltrationSchedule)(Infiltration Schedule)(8))
36 ((SteamEquipmentSchedule)(Steam Equipment Schedule)(9))
37 ((OtherEquipmentSchedule)(Other Equipment Schedule)(10))
38 ((DesignPowerInputScheduleName)(Design Power Input Schedule)(11))
39 ((CPULoadingScheduleName)(CPU Loading Schedule)(12))
40 );
41
42 // clang-format on
43
44 /** DefaultScheduleSet is a ResourceObject that wraps the OpenStudio IDD object
45 * 'OS:DefaultScheduleSet'. */
46 class MODEL_API DefaultScheduleSet : public ResourceObject
47 {
48 public:
49 /** @name Constructors and Destructors */
50 //@{
51
52 explicit DefaultScheduleSet(const Model& model);
53
54 3445 virtual ~DefaultScheduleSet() override = default;
55 // Default the copy and move operators because the virtual dtor is explicit
56 168 DefaultScheduleSet(const DefaultScheduleSet& other) = default;
57 2153 DefaultScheduleSet(DefaultScheduleSet&& other) = default;
58 ✗ DefaultScheduleSet& operator=(const DefaultScheduleSet&) = default;
59 8 DefaultScheduleSet& operator=(DefaultScheduleSet&&) = default;
60
61 //@}
62 /** @name Static Methods */
63 //@{
64
65 static IddObjectType iddObjectType();
66
67 //@}
68 /** @name Getters */
69 //@{
70
71 boost::optional<Schedule> hoursofOperationSchedule() const;
72
73 boost::optional<Schedule> numberofPeopleSchedule() const;
74
75 boost::optional<Schedule> peopleActivityLevelSchedule() const;
76
77 boost::optional<Schedule> lightingSchedule() const;
78
79 boost::optional<Schedule> electricEquipmentSchedule() const;
80
81 boost::optional<Schedule> gasEquipmentSchedule() const;
82
83 boost::optional<Schedule> hotWaterEquipmentSchedule() const;
84
85 boost::optional<Schedule> infiltrationSchedule() const;
86
87 boost::optional<Schedule> steamEquipmentSchedule() const;
88
89 boost::optional<Schedule> otherEquipmentSchedule() const;
90
91 //@}
92 /** @name Setters */
93 //@{
94
95 bool setHoursofOperationSchedule(Schedule& schedule);
96
97 void resetHoursofOperationSchedule();
98
99 bool setNumberofPeopleSchedule(Schedule& schedule);
100
101 void resetNumberofPeopleSchedule();
102
103 bool setPeopleActivityLevelSchedule(Schedule& schedule);
104
105 void resetPeopleActivityLevelSchedule();
106
107 bool setLightingSchedule(Schedule& schedule);
108
109 void resetLightingSchedule();
110
111 bool setElectricEquipmentSchedule(Schedule& schedule);
112
113 void resetElectricEquipmentSchedule();
114
115 bool setGasEquipmentSchedule(Schedule& schedule);
116
117 void resetGasEquipmentSchedule();
118
119 bool setHotWaterEquipmentSchedule(Schedule& schedule);
120
121 void resetHotWaterEquipmentSchedule();
122
123 bool setInfiltrationSchedule(Schedule& schedule);
124
125 void resetInfiltrationSchedule();
126
127 bool setSteamEquipmentSchedule(Schedule& schedule);
128
129 void resetSteamEquipmentSchedule();
130
131 bool setOtherEquipmentSchedule(Schedule& schedule);
132
133 void resetOtherEquipmentSchedule();
134
135 //@}
136 /** @name Other */
137 //@{
138
139 /// Returns the default schedule of a particular type.
140 boost::optional<Schedule> getDefaultSchedule(const DefaultScheduleType& defaultScheduleType) const;
141
142 /// Merge this object with other one, keep fields from this object if set otherwise set to value from other.
143 void merge(const DefaultScheduleSet& other);
144
145 //@}
146 protected:
147 /// @cond
148 using ImplType = detail::DefaultScheduleSet_Impl;
149
150 friend class Model;
151 friend class openstudio::IdfObject;
152
153 explicit DefaultScheduleSet(std::shared_ptr<detail::DefaultScheduleSet_Impl> impl);
154
155 /// @endcond
156 private:
157 REGISTER_LOGGER("openstudio.model.DefaultScheduleSet");
158 };
159
160 /** \relates DefaultScheduleSet*/
161 using OptionalDefaultScheduleSet = boost::optional<DefaultScheduleSet>;
162
163 /** \relates DefaultScheduleSet*/
164 using DefaultScheduleSetVector = std::vector<DefaultScheduleSet>;
165
166 } // namespace model
167 } // namespace openstudio
168
169 #endif // MODEL_DEFAULTSCHEDULESET_HPP
170