GCC Code Coverage Report


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

src/model/ScheduleVariableInterval.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_SCHEDULEVARIABLEINTERVAL_HPP
7 #define MODEL_SCHEDULEVARIABLEINTERVAL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ScheduleInterval.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 class ScheduleVariableInterval_Impl;
18
19 } // namespace detail
20
21 /** ScheduleVariableInterval is a ScheduleInterval that wraps the OpenStudio IDD object
22 * 'OS_Schedule_VariableInterval'. */
23 class MODEL_API ScheduleVariableInterval : public ScheduleInterval
24 {
25 public:
26 /** @name Constructors and Destructors */
27 //@{
28
29 explicit ScheduleVariableInterval(const Model& model);
30
31 20 virtual ~ScheduleVariableInterval() override = default;
32 // Default the copy and move operators because the virtual dtor is explicit
33 ✗ ScheduleVariableInterval(const ScheduleVariableInterval& other) = default;
34 5 ScheduleVariableInterval(ScheduleVariableInterval&& other) = default;
35 ✗ ScheduleVariableInterval& operator=(const ScheduleVariableInterval&) = default;
36 ✗ ScheduleVariableInterval& operator=(ScheduleVariableInterval&&) = default;
37
38 //@}
39
40 static IddObjectType iddObjectType();
41
42 /** @name Getters */
43 //@{
44
45 bool interpolatetoTimestep() const;
46
47 bool isInterpolatetoTimestepDefaulted() const;
48
49 double outOfRangeValue() const;
50
51 bool isOutOfRangeValueDefaulted() const;
52
53 int startMonth() const;
54
55 int startDay() const;
56
57 //@}
58 /** @name Setters */
59 //@{
60
61 bool setInterpolatetoTimestep(bool interpolatetoTimestep);
62
63 void resetInterpolatetoTimestep();
64
65 bool setOutOfRangeValue(double outOfRangeValue);
66
67 void resetOutOfRangeValue();
68
69 bool setStartMonth(int startMonth);
70
71 bool setStartDay(int startDay);
72
73 //@}
74 protected:
75 /// @cond
76 using ImplType = detail::ScheduleVariableInterval_Impl;
77
78 friend class Model;
79 friend class openstudio::IdfObject;
80 friend class detail::ScheduleVariableInterval_Impl;
81
82 explicit ScheduleVariableInterval(std::shared_ptr<detail::ScheduleVariableInterval_Impl> impl);
83 /// @endcond
84 private:
85 REGISTER_LOGGER("openstudio.model.ScheduleVariableInterval");
86 };
87
88 /** \relates ScheduleVariableInterval*/
89 using OptionalScheduleVariableInterval = boost::optional<ScheduleVariableInterval>;
90
91 /** \relates ScheduleVariableInterval*/
92 using ScheduleVariableIntervalVector = std::vector<ScheduleVariableInterval>;
93
94 } // namespace model
95 } // namespace openstudio
96
97 #endif // MODEL_SCHEDULEVARIABLEINTERVAL_HPP
98