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/RunPeriodControlDaylightSavingTime.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_RUNPERIODCONTROLDAYLIGHTSAVINGTIME_HPP
7 #define MODEL_RUNPERIODCONTROLDAYLIGHTSAVINGTIME_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13
14 class Date;
15 class MonthOfYear;
16 class NthDayOfWeekInMonth;
17 class DayOfWeek;
18
19 namespace model {
20
21 namespace detail {
22
23 class RunPeriodControlDaylightSavingTime_Impl;
24
25 } // namespace detail
26
27 /** RunPeriodControlDaylightSavingTime is a ModelObject that wraps the OpenStudio IDD object 'OS_RunPeriodControl_DaylightSavingTime'. */
28 class MODEL_API RunPeriodControlDaylightSavingTime : public ModelObject
29 {
30 public:
31 /** @name Constructors and Destructors */
32 //@{
33
34 50 virtual ~RunPeriodControlDaylightSavingTime() override = default;
35 // Default the copy and move operators because the virtual dtor is explicit
36 9 RunPeriodControlDaylightSavingTime(const RunPeriodControlDaylightSavingTime& other) = default;
37 9 RunPeriodControlDaylightSavingTime(RunPeriodControlDaylightSavingTime&& other) = default;
38 ✗ RunPeriodControlDaylightSavingTime& operator=(const RunPeriodControlDaylightSavingTime&) = default;
39 ✗ RunPeriodControlDaylightSavingTime& operator=(RunPeriodControlDaylightSavingTime&&) = default;
40
41 //@}
42 /** @name Static Methods */
43 //@{
44
45 static IddObjectType iddObjectType();
46
47 //@}
48 /** @name Getters */
49 //@{
50
51 openstudio::Date startDate() const;
52
53 boost::optional<openstudio::NthDayOfWeekInMonth> startNthDayOfWeekInMonth() const;
54
55 openstudio::Date endDate() const;
56
57 boost::optional<openstudio::NthDayOfWeekInMonth> endNthDayOfWeekInMonth() const;
58
59 //@}
60 /** @name Setters */
61 //@{
62
63 bool setStartDate(const std::string& startDate);
64 bool setStartDate(const openstudio::MonthOfYear& monthOfYear, unsigned day);
65 bool setStartDate(const openstudio::NthDayOfWeekInMonth& nth, const openstudio::DayOfWeek& dayOfWeek, const openstudio::MonthOfYear& monthOfYear);
66
67 bool setEndDate(const std::string& endDate);
68 bool setEndDate(const openstudio::MonthOfYear& monthOfYear, unsigned day);
69 bool setEndDate(const openstudio::NthDayOfWeekInMonth& nth, const openstudio::DayOfWeek& dayOfWeek, const openstudio::MonthOfYear& monthOfYear);
70
71 // ensure that this object does not contain the date 2/29
72 void ensureNoLeapDays();
73
74 //@}
75 protected:
76 /// @cond
77 using ImplType = detail::RunPeriodControlDaylightSavingTime_Impl;
78
79 friend class detail::RunPeriodControlDaylightSavingTime_Impl;
80 friend class Model;
81 friend class IdfObject;
82 friend class openstudio::detail::IdfObject_Impl;
83
84 explicit RunPeriodControlDaylightSavingTime(std::shared_ptr<detail::RunPeriodControlDaylightSavingTime_Impl> impl);
85
86 explicit RunPeriodControlDaylightSavingTime(Model& model);
87
88 /// @endcond
89 private:
90 REGISTER_LOGGER("openstudio.model.RunPeriodControlDaylightSavingTime");
91 };
92
93 /** \relates RunPeriodControlDaylightSavingTime*/
94 using OptionalRunPeriodControlDaylightSavingTime = boost::optional<RunPeriodControlDaylightSavingTime>;
95
96 /** \relates RunPeriodControlDaylightSavingTime*/
97 using RunPeriodControlDaylightSavingTimeVector = std::vector<RunPeriodControlDaylightSavingTime>;
98
99 } // namespace model
100 } // namespace openstudio
101
102 #endif // MODEL_RUNPERIODCONTROLDAYLIGHTSAVINGTIME_HPP
103