src/model/Schedule.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_SCHEDULE_HPP | ||
| 7 | #define MODEL_SCHEDULE_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ScheduleBase.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | namespace detail { | ||
| 16 | class Schedule_Impl; | ||
| 17 | } | ||
| 18 | |||
| 19 | /** Schedule is a ScheduleBase abstract class that represents the reference list 'ScheduleNames'. | ||
| 20 | * The 'ScheduleNames' reference list includes objects of type: | ||
| 21 | * \li OS:Schedule:Year | ||
| 22 | * \li OS:Schedule:Compact | ||
| 23 | * \li OS:Schedule:Constant | ||
| 24 | * \li OS:Schedule:Ruleset | ||
| 25 | * \li OS:Schedule:FixedInterval | ||
| 26 | * \li OS:Schedule:VariableInterval | ||
| 27 | * | ||
| 28 | * For detailed information on ScheduleTypeLimits, please see ScheduleBase and | ||
| 29 | * \link ScheduleTypeRegistry ScheduleTypeRegistry \endlink. In general, ModelObject | ||
| 30 | * setters that take a Schedule will fail if the ScheduleTypeLimits are set and are incompatible | ||
| 31 | * with the proposed use. This ensures that the Schedule is written using units and bounds | ||
| 32 | * expected by the user object (e.g. fractional for lighting schedules, W for people activity | ||
| 33 | * level schedules, C or F for thermostat schedules). */ | ||
| 34 | class MODEL_API Schedule : public ScheduleBase | ||
| 35 | { | ||
| 36 | public: | ||
| 37 | /** @name Constructors and Destructors */ | ||
| 38 | //@{ | ||
| 39 | |||
| 40 | 95343 | virtual ~Schedule() override = default; | |
| 41 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 42 | 9895 | Schedule(const Schedule& other) = default; | |
| 43 | 25757 | Schedule(Schedule&& other) = default; | |
| 44 | 2 | Schedule& operator=(const Schedule&) = default; | |
| 45 | 1892 | Schedule& operator=(Schedule&&) = default; | |
| 46 | |||
| 47 | //@} | ||
| 48 | protected: | ||
| 49 | /// @cond | ||
| 50 | using ImplType = detail::Schedule_Impl; | ||
| 51 | |||
| 52 | friend class Model; | ||
| 53 | friend class openstudio::IdfObject; | ||
| 54 | friend class openstudio::detail::IdfObject_Impl; | ||
| 55 | |||
| 56 | // constructor | ||
| 57 | explicit Schedule(std::shared_ptr<detail::Schedule_Impl> impl); | ||
| 58 | |||
| 59 | Schedule(IddObjectType type, const Model& model); | ||
| 60 | |||
| 61 | /// @endcond | ||
| 62 | private: | ||
| 63 | REGISTER_LOGGER("openstudio.model.Schedule"); | ||
| 64 | }; | ||
| 65 | |||
| 66 | // optional Schedule | ||
| 67 | using OptionalSchedule = boost::optional<Schedule>; | ||
| 68 | |||
| 69 | // vector of Schedule | ||
| 70 | using ScheduleVector = std::vector<Schedule>; | ||
| 71 | |||
| 72 | } // namespace model | ||
| 73 | } // namespace openstudio | ||
| 74 | |||
| 75 | #endif | ||
| 76 |