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/RunPeriod_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_RUNPERIOD_IMPL_HPP
7 #define MODEL_RUNPERIOD_IMPL_HPP
8
9 #include "ParentObject_Impl.hpp"
10
11 namespace openstudio {
12 namespace model {
13
14 namespace detail {
15
16 class MODEL_API RunPeriod_Impl : public ParentObject_Impl
17 {
18 public:
19 // constructor
20 RunPeriod_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
21
22 // construct from workspace
23 RunPeriod_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
24
25 // clone copy constructor
26 RunPeriod_Impl(const RunPeriod_Impl& other, Model_Impl* model, bool keepHandle);
27
28 // virtual destructor
29 1357 virtual ~RunPeriod_Impl() override = default;
30
31 int getBeginMonth() const;
32 int getBeginDayOfMonth() const;
33 int getEndMonth() const;
34 int getEndDayOfMonth() const;
35 bool getUseWeatherFileHolidays() const;
36 bool getUseWeatherFileDaylightSavings() const;
37 bool getApplyWeekendHolidayRule() const;
38 bool getUseWeatherFileRainInd() const;
39 bool getUseWeatherFileSnowInd() const;
40 int getNumTimePeriodRepeats() const;
41
42 bool setBeginMonth(int month);
43 bool setBeginDayOfMonth(int day);
44 bool setEndMonth(int month);
45 bool setEndDayOfMonth(int day);
46 bool setUseWeatherFileHolidays(bool use);
47 bool setUseWeatherFileDaylightSavings(bool use);
48 bool setApplyWeekendHolidayRule(bool apply);
49 bool setUseWeatherFileRainInd(bool rainInd);
50 bool setUseWeatherFileSnowInd(bool snowInd);
51 bool setNumTimePeriodRepeats(int numRepeats);
52
53 // ensure that this object does not contain the date 2/29
54 void ensureNoLeapDays();
55
56 // return the parent object in the hierarchy
57 virtual boost::optional<ParentObject> parent() const override;
58
59 // set the parent, child may have to call methods on the parent
60 virtual bool setParent(ParentObject& newParent) override;
61
62 // return any children objects in the hierarchy
63 virtual std::vector<ModelObject> children() const override;
64
65 /// get a vector of allowable children types
66 virtual std::vector<IddObjectType> allowableChildTypes() const override;
67
68 // Get all output variable names that could be associated with this object.
69 virtual const std::vector<std::string>& outputVariableNames() const override;
70
71 virtual IddObjectType iddObjectType() const override;
72
73 /** @name Queries */
74 //@{
75
76 bool isAnnual() const;
77
78 bool isPartialYear() const;
79
80 bool isRepeated() const;
81
82 //@}
83
84 private:
85 REGISTER_LOGGER("openstudio.model.RunPeriod");
86 };
87
88 } // namespace detail
89
90 } // namespace model
91 } // namespace openstudio
92
93 #endif // MODEL_RUNPERIOD_IMPL_HPP
94