src/model/ConnectorMixer.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_CONNECTORMIXER_HPP | ||
| 7 | #define MODEL_CONNECTORMIXER_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "Mixer.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | namespace detail { | ||
| 17 | class ConnectorMixer_Impl; | ||
| 18 | } // namespace detail | ||
| 19 | |||
| 20 | /** Mixer is an interface to the IDD object named "OS:Connector:Mixer" | ||
| 21 | * | ||
| 22 | * The purpose of this class is to simplify the construction and manipulation | ||
| 23 | * of mixer objects in EnergyPlus. Methods are built around the | ||
| 24 | * acts of getting the inlet and outlet ports to the mixer. Branch indexes | ||
| 25 | * are used to refer to the many inlet ports of the mixer | ||
| 26 | */ | ||
| 27 | class MODEL_API ConnectorMixer : public Mixer | ||
| 28 | { | ||
| 29 | public: | ||
| 30 | /** Constructs a new Mixer object and places it inside the model. */ | ||
| 31 | explicit ConnectorMixer(const Model& model); | ||
| 32 | |||
| 33 | 1035 | virtual ~ConnectorMixer() override = default; | |
| 34 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 35 | ✗ | ConnectorMixer(const ConnectorMixer& other) = default; | |
| 36 | ✗ | ConnectorMixer(ConnectorMixer&& other) = default; | |
| 37 | ✗ | ConnectorMixer& operator=(const ConnectorMixer&) = default; | |
| 38 | ✗ | ConnectorMixer& operator=(ConnectorMixer&&) = default; | |
| 39 | |||
| 40 | unsigned outletPort() const override; | ||
| 41 | |||
| 42 | unsigned inletPort(unsigned branchIndex) const override; | ||
| 43 | |||
| 44 | unsigned nextInletPort() const override; | ||
| 45 | |||
| 46 | virtual bool addToNode(Node& node); | ||
| 47 | |||
| 48 | virtual std::vector<openstudio::IdfObject> remove(); | ||
| 49 | |||
| 50 | virtual ModelObject clone(Model model) const; | ||
| 51 | |||
| 52 | static IddObjectType iddObjectType(); | ||
| 53 | |||
| 54 | protected: | ||
| 55 | using ImplType = detail::ConnectorMixer_Impl; | ||
| 56 | |||
| 57 | friend class Model; | ||
| 58 | |||
| 59 | friend class openstudio::IdfObject; | ||
| 60 | |||
| 61 | explicit ConnectorMixer(std::shared_ptr<detail::ConnectorMixer_Impl> impl); | ||
| 62 | |||
| 63 | private: | ||
| 64 | REGISTER_LOGGER("openstudio.model.ConnectorMixer"); | ||
| 65 | |||
| 66 | ConnectorMixer(const Handle& handle, const Model& model); | ||
| 67 | }; | ||
| 68 | |||
| 69 | /** \relates ConnectorMixer */ | ||
| 70 | using OptionalConnectorMixer = boost::optional<ConnectorMixer>; | ||
| 71 | |||
| 72 | } // namespace model | ||
| 73 | |||
| 74 | } // namespace openstudio | ||
| 75 | |||
| 76 | #endif // MODEL_CONNECTORMIXER_HPP | ||
| 77 |