GCC Code Coverage Report


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

src/model/ScheduleWeek.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_SCHEDULEWEEK_HPP
7 #define MODEL_SCHEDULEWEEK_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ResourceObject.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class ScheduleDay;
16
17 namespace detail {
18
19 class ScheduleWeek_Impl;
20
21 } // namespace detail
22
23 /** ScheduleWeek is a ResourceObject that wraps the OpenStudio IDD object
24 * 'OS_Schedule_Week'. */
25 class MODEL_API ScheduleWeek : public ResourceObject
26 {
27 public:
28 /** @name Constructors and Destructors */
29 //@{
30
31 explicit ScheduleWeek(const Model& model);
32
33 1331 virtual ~ScheduleWeek() override = default;
34 // Default the copy and move operators because the virtual dtor is explicit
35 312 ScheduleWeek(const ScheduleWeek& other) = default;
36 524 ScheduleWeek(ScheduleWeek&& other) = default;
37 ✗ ScheduleWeek& operator=(const ScheduleWeek&) = default;
38 ✗ ScheduleWeek& operator=(ScheduleWeek&&) = default;
39
40 //@}
41
42 static IddObjectType iddObjectType();
43
44 /** @name Getters */
45 //@{
46
47 boost::optional<ScheduleDay> sundaySchedule() const;
48
49 boost::optional<ScheduleDay> mondaySchedule() const;
50
51 boost::optional<ScheduleDay> tuesdaySchedule() const;
52
53 boost::optional<ScheduleDay> wednesdaySchedule() const;
54
55 boost::optional<ScheduleDay> thursdaySchedule() const;
56
57 boost::optional<ScheduleDay> fridaySchedule() const;
58
59 boost::optional<ScheduleDay> saturdaySchedule() const;
60
61 boost::optional<ScheduleDay> holidaySchedule() const;
62
63 boost::optional<ScheduleDay> summerDesignDaySchedule() const;
64
65 boost::optional<ScheduleDay> winterDesignDaySchedule() const;
66
67 boost::optional<ScheduleDay> customDay1Schedule() const;
68
69 boost::optional<ScheduleDay> customDay2Schedule() const;
70
71 //@}
72 /** @name Setters */
73 //@{
74
75 bool setSundaySchedule(const ScheduleDay& schedule);
76
77 bool setMondaySchedule(const ScheduleDay& schedule);
78
79 bool setTuesdaySchedule(const ScheduleDay& schedule);
80
81 bool setWednesdaySchedule(const ScheduleDay& schedule);
82
83 bool setThursdaySchedule(const ScheduleDay& schedule);
84
85 bool setFridaySchedule(const ScheduleDay& schedule);
86
87 bool setSaturdaySchedule(const ScheduleDay& schedule);
88
89 bool setHolidaySchedule(const ScheduleDay& schedule);
90
91 bool setSummerDesignDaySchedule(const ScheduleDay& schedule);
92
93 bool setWinterDesignDaySchedule(const ScheduleDay& schedule);
94
95 bool setCustomDay1Schedule(const ScheduleDay& schedule);
96
97 bool setCustomDay2Schedule(const ScheduleDay& schedule);
98
99 //@}
100 /** @name Other */
101 //@{
102
103 /// Set schedules for all days.
104 bool setAllSchedules(const ScheduleDay& schedule);
105
106 /// Set schedules for all weekdays.
107 bool setWeekdaySchedule(const ScheduleDay& schedule);
108
109 /// Set schedules for all weekends.
110 bool setWeekendSchedule(const ScheduleDay& schedule);
111
112 //@}
113 protected:
114 /// @cond
115 using ImplType = detail::ScheduleWeek_Impl;
116
117 friend class Model;
118 friend class openstudio::IdfObject;
119 friend class detail::ScheduleWeek_Impl;
120
121 explicit ScheduleWeek(std::shared_ptr<detail::ScheduleWeek_Impl> impl);
122
123 /// @endcond
124 private:
125 REGISTER_LOGGER("openstudio.model.ScheduleWeek");
126 };
127
128 /** \relates ScheduleWeek*/
129 using OptionalScheduleWeek = boost::optional<ScheduleWeek>;
130
131 /** \relates ScheduleWeek*/
132 using ScheduleWeekVector = std::vector<ScheduleWeek>;
133
134 } // namespace model
135 } // namespace openstudio
136
137 #endif // MODEL_SCHEDULEWEEK_HPP
138