src/model/EnergyManagementSystemSubroutine.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_ENERGYMANAGEMENTSYSTEMSUBROUTINE_HPP | ||
| 7 | #define MODEL_ENERGYMANAGEMENTSYSTEMSUBROUTINE_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class EnergyManagementSystemMeteredOutputVariable; | ||
| 16 | |||
| 17 | namespace detail { | ||
| 18 | |||
| 19 | class EnergyManagementSystemSubroutine_Impl; | ||
| 20 | |||
| 21 | } // namespace detail | ||
| 22 | |||
| 23 | /** EnergyManagementSystemSubroutine is a ModelObject that wraps the OpenStudio IDD object 'OS:EnergyManagementSystem:Subroutine'. */ | ||
| 24 | class MODEL_API EnergyManagementSystemSubroutine : public ModelObject | ||
| 25 | { | ||
| 26 | public: | ||
| 27 | /** @name Constructors and Destructors */ | ||
| 28 | //@{ | ||
| 29 | |||
| 30 | explicit EnergyManagementSystemSubroutine(const Model& model); | ||
| 31 | |||
| 32 | 25 | virtual ~EnergyManagementSystemSubroutine() override = default; | |
| 33 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 34 | 1 | EnergyManagementSystemSubroutine(const EnergyManagementSystemSubroutine& other) = default; | |
| 35 | 3 | EnergyManagementSystemSubroutine(EnergyManagementSystemSubroutine&& other) = default; | |
| 36 | ✗ | EnergyManagementSystemSubroutine& operator=(const EnergyManagementSystemSubroutine&) = default; | |
| 37 | ✗ | EnergyManagementSystemSubroutine& operator=(EnergyManagementSystemSubroutine&&) = default; | |
| 38 | |||
| 39 | //@} | ||
| 40 | |||
| 41 | static IddObjectType iddObjectType(); | ||
| 42 | |||
| 43 | /** @name Getters */ | ||
| 44 | //@{ | ||
| 45 | |||
| 46 | std::string body() const; | ||
| 47 | |||
| 48 | std::vector<std::string> lines() const; | ||
| 49 | |||
| 50 | std::vector<ModelObject> referencedObjects() const; | ||
| 51 | |||
| 52 | std::vector<std::string> invalidReferencedObjects() const; | ||
| 53 | |||
| 54 | //@} | ||
| 55 | /** @name Setters */ | ||
| 56 | //@{ | ||
| 57 | |||
| 58 | bool setBody(const std::string& body); | ||
| 59 | |||
| 60 | bool resetBody(); | ||
| 61 | |||
| 62 | bool addLine(const std::string& body); | ||
| 63 | |||
| 64 | bool setLines(const std::vector<std::string>& body); | ||
| 65 | |||
| 66 | //@} | ||
| 67 | /** @name Other */ | ||
| 68 | //@{ | ||
| 69 | |||
| 70 | // Convenience method to return all EnergyManagementSystemMeteredOutputVariable that refer to this Subroutine | ||
| 71 | std::vector<EnergyManagementSystemMeteredOutputVariable> energyManagementSystemMeteredOutputVariables() const; | ||
| 72 | |||
| 73 | //@} | ||
| 74 | protected: | ||
| 75 | /// @cond | ||
| 76 | using ImplType = detail::EnergyManagementSystemSubroutine_Impl; | ||
| 77 | |||
| 78 | explicit EnergyManagementSystemSubroutine(std::shared_ptr<detail::EnergyManagementSystemSubroutine_Impl> impl); | ||
| 79 | |||
| 80 | friend class detail::EnergyManagementSystemSubroutine_Impl; | ||
| 81 | friend class Model; | ||
| 82 | friend class IdfObject; | ||
| 83 | friend class openstudio::detail::IdfObject_Impl; | ||
| 84 | /// @endcond | ||
| 85 | private: | ||
| 86 | REGISTER_LOGGER("openstudio.model.EnergyManagementSystemSubroutine"); | ||
| 87 | }; | ||
| 88 | |||
| 89 | /** \relates EnergyManagementSystemSubroutine*/ | ||
| 90 | using OptionalEnergyManagementSystemSubroutine = boost::optional<EnergyManagementSystemSubroutine>; | ||
| 91 | |||
| 92 | /** \relates EnergyManagementSystemSubroutine*/ | ||
| 93 | using EnergyManagementSystemSubroutineVector = std::vector<EnergyManagementSystemSubroutine>; | ||
| 94 | |||
| 95 | } // namespace model | ||
| 96 | } // namespace openstudio | ||
| 97 | |||
| 98 | #endif // MODEL_ENERGYMANAGEMENTSYSTEMSUBROUTINE_HPP | ||
| 99 |