GCC Code Coverage Report


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

src/model/RunPeriodControlSpecialDays_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_RUNPERIODCONTROLSPECIALDAYS_IMPL_HPP
7 #define MODEL_RUNPERIODCONTROLSPECIALDAYS_IMPL_HPP
8
9 #include "ModelObject_Impl.hpp"
10
11 namespace openstudio {
12
13 class Date;
14 class MonthOfYear;
15 class NthDayOfWeekInMonth;
16 class DayOfWeek;
17
18 namespace model {
19
20 namespace detail {
21
22 class MODEL_API RunPeriodControlSpecialDays_Impl : public ModelObject_Impl
23 {
24 public:
25 // constructor
26 RunPeriodControlSpecialDays_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
27
28 // construct from workspace
29 RunPeriodControlSpecialDays_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
30
31 // clone copy constructor
32 RunPeriodControlSpecialDays_Impl(const RunPeriodControlSpecialDays_Impl& other, Model_Impl* model, bool keepHandle);
33
34 // virtual destructor
35 209 virtual ~RunPeriodControlSpecialDays_Impl() override = default;
36
37 Date startDate() const;
38 unsigned duration() const;
39 std::string specialDayType() const;
40
41 bool setStartDate(const std::string& startDate);
42 bool setStartDate(const openstudio::MonthOfYear& monthOfYear, unsigned day);
43 bool setStartDate(const openstudio::NthDayOfWeekInMonth& nth, const openstudio::DayOfWeek& dayOfWeek,
44 const openstudio::MonthOfYear& monthOfYear);
45 bool setDuration(unsigned duration);
46 bool setSpecialDayType(const std::string& specialDayType);
47
48 // ensure that this object does not contain the date 2/29
49 void ensureNoLeapDays();
50
51 // virtual methods
52 virtual boost::optional<ParentObject> parent() const override;
53
54 virtual bool setParent(ParentObject& newParent) override;
55
56 virtual const std::vector<std::string>& outputVariableNames() const override;
57
58 virtual IddObjectType iddObjectType() const override;
59
60 private:
61 openstudio::Date getDate(const std::string& text) const;
62
63 − REGISTER_LOGGER("openstudio.model.RunPeriodControlSpecialDays");
64 };
65
66 } // namespace detail
67
68 } // namespace model
69 } // namespace openstudio
70
71 #endif // MODEL_RUNPERIODCONTROLSPECIALDAYS_IMPL_HPP
72