src/model/SetpointManager.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_SETPOINTMANAGER_HPP | ||
| 7 | #define MODEL_SETPOINTMANAGER_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "HVACComponent.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | namespace detail { | ||
| 17 | |||
| 18 | class SetpointManager_Impl; | ||
| 19 | |||
| 20 | } | ||
| 21 | |||
| 22 | /** SetpointManager is the base class for setpoint managers. | ||
| 23 | * | ||
| 24 | */ | ||
| 25 | class MODEL_API SetpointManager : public HVACComponent | ||
| 26 | { | ||
| 27 | public: | ||
| 28 | /** @name Constructors and Destructors */ | ||
| 29 | //@{ | ||
| 30 | |||
| 31 | 13751 | virtual ~SetpointManager() override = default; | |
| 32 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 33 | 4991 | SetpointManager(const SetpointManager& other) = default; | |
| 34 | 3529 | SetpointManager(SetpointManager&& other) = default; | |
| 35 | ✗ | SetpointManager& operator=(const SetpointManager&) = default; | |
| 36 | ✗ | SetpointManager& operator=(SetpointManager&&) = default; | |
| 37 | |||
| 38 | //@} | ||
| 39 | |||
| 40 | /** @name Getters */ | ||
| 41 | //@{ | ||
| 42 | |||
| 43 | /** Returns the Node referred to by the SetpointNodeName field. **/ | ||
| 44 | boost::optional<Node> setpointNode() const; | ||
| 45 | |||
| 46 | /** Returns the Control Variable **/ | ||
| 47 | std::string controlVariable() const; | ||
| 48 | |||
| 49 | /** Returns whether this SPM is allowed to be placed on a PlantLoop | ||
| 50 | * (*all* SPMs are allowed on an AirLoopHVAC, *some* are allowed on a PlantLoop) **/ | ||
| 51 | bool isAllowedOnPlantLoop() const; | ||
| 52 | |||
| 53 | //@} | ||
| 54 | /** @name Setters */ | ||
| 55 | //@{ | ||
| 56 | |||
| 57 | /** Sets the Control Variable **/ | ||
| 58 | bool setControlVariable(const std::string& controlVariable); | ||
| 59 | |||
| 60 | //@} | ||
| 61 | /** @name Other */ | ||
| 62 | //@{ | ||
| 63 | |||
| 64 | //@} | ||
| 65 | protected: | ||
| 66 | /** Constructs a new SetpointManager object and places it inside | ||
| 67 | * model. */ | ||
| 68 | SetpointManager(IddObjectType type, const Model& model); | ||
| 69 | |||
| 70 | friend class Model; | ||
| 71 | friend class openstudio::IdfObject; | ||
| 72 | friend class openstudio::detail::IdfObject_Impl; | ||
| 73 | friend class detail::SetpointManager_Impl; | ||
| 74 | |||
| 75 | /// @cond | ||
| 76 | using ImplType = detail::SetpointManager_Impl; | ||
| 77 | |||
| 78 | explicit SetpointManager(std::shared_ptr<detail::SetpointManager_Impl> impl); | ||
| 79 | |||
| 80 | private: | ||
| 81 | REGISTER_LOGGER("openstudio.model.SetpointManager"); | ||
| 82 | /// @endcond | ||
| 83 | }; | ||
| 84 | |||
| 85 | using OptionalSetpointManager = boost::optional<SetpointManager>; | ||
| 86 | using SetpointManagerVector = std::vector<SetpointManager>; | ||
| 87 | |||
| 88 | } // namespace model | ||
| 89 | |||
| 90 | } // namespace openstudio | ||
| 91 | |||
| 92 | #endif // MODEL_SETPOINTMANAGER_HPP | ||
| 93 |