src/model/ScheduleFixedInterval.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_SCHEDULEFIXEDINTERVAL_HPP | ||
| 7 | #define MODEL_SCHEDULEFIXEDINTERVAL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ScheduleInterval.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | namespace detail { | ||
| 16 | |||
| 17 | class ScheduleFixedInterval_Impl; | ||
| 18 | |||
| 19 | } // namespace detail | ||
| 20 | |||
| 21 | /** ScheduleFixedInterval is a ScheduleInterval that wraps the OpenStudio IDD object | ||
| 22 | * 'OS_Schedule_FixedInterval'. */ | ||
| 23 | class MODEL_API ScheduleFixedInterval : public ScheduleInterval | ||
| 24 | { | ||
| 25 | public: | ||
| 26 | /** @name Constructors and Destructors */ | ||
| 27 | //@{ | ||
| 28 | |||
| 29 | explicit ScheduleFixedInterval(const Model& model); | ||
| 30 | |||
| 31 | 57 | virtual ~ScheduleFixedInterval() override = default; | |
| 32 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 33 | 6 | ScheduleFixedInterval(const ScheduleFixedInterval& other) = default; | |
| 34 | 15 | ScheduleFixedInterval(ScheduleFixedInterval&& other) = default; | |
| 35 | ✗ | ScheduleFixedInterval& operator=(const ScheduleFixedInterval&) = default; | |
| 36 | ✗ | ScheduleFixedInterval& operator=(ScheduleFixedInterval&&) = 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 | bool translatetoScheduleFile() const; | ||
| 50 | |||
| 51 | bool isTranslatetoScheduleFileDefaulted() const; | ||
| 52 | |||
| 53 | int intervalLength() const; | ||
| 54 | |||
| 55 | double outOfRangeValue() const; | ||
| 56 | |||
| 57 | bool isOutOfRangeValueDefaulted() const; | ||
| 58 | |||
| 59 | int startMonth() const; | ||
| 60 | |||
| 61 | int startDay() const; | ||
| 62 | |||
| 63 | //@} | ||
| 64 | /** @name Setters */ | ||
| 65 | //@{ | ||
| 66 | |||
| 67 | bool setInterpolatetoTimestep(bool interpolatetoTimestep); | ||
| 68 | |||
| 69 | void resetInterpolatetoTimestep(); | ||
| 70 | |||
| 71 | bool setTranslatetoScheduleFile(bool translatetoScheduleFile); | ||
| 72 | |||
| 73 | void resetTranslatetoScheduleFile(); | ||
| 74 | |||
| 75 | bool setIntervalLength(int intervalLength); | ||
| 76 | |||
| 77 | bool setOutOfRangeValue(double outOfRangeValue); | ||
| 78 | |||
| 79 | void resetOutOfRangeValue(); | ||
| 80 | |||
| 81 | bool setStartMonth(int startMonth); | ||
| 82 | |||
| 83 | bool setStartDay(int startDay); | ||
| 84 | |||
| 85 | //@} | ||
| 86 | protected: | ||
| 87 | /// @cond | ||
| 88 | using ImplType = detail::ScheduleFixedInterval_Impl; | ||
| 89 | |||
| 90 | friend class Model; | ||
| 91 | friend class openstudio::IdfObject; | ||
| 92 | friend class detail::ScheduleFixedInterval_Impl; | ||
| 93 | |||
| 94 | explicit ScheduleFixedInterval(std::shared_ptr<detail::ScheduleFixedInterval_Impl> impl); | ||
| 95 | |||
| 96 | /// @endcond | ||
| 97 | private: | ||
| 98 | REGISTER_LOGGER("openstudio.model.ScheduleFixedInterval"); | ||
| 99 | }; | ||
| 100 | |||
| 101 | /** \relates ScheduleFixedInterval*/ | ||
| 102 | using OptionalScheduleFixedInterval = boost::optional<ScheduleFixedInterval>; | ||
| 103 | |||
| 104 | /** \relates ScheduleFixedInterval*/ | ||
| 105 | using ScheduleFixedIntervalVector = std::vector<ScheduleFixedInterval>; | ||
| 106 | |||
| 107 | } // namespace model | ||
| 108 | } // namespace openstudio | ||
| 109 | |||
| 110 | #endif // MODEL_SCHEDULEFIXEDINTERVAL_HPP | ||
| 111 |