src/model/OutsideSurfaceConvectionAlgorithm.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_OUTSIDESURFACECONVECTIONALGORITHM_HPP | ||
| 7 | #define MODEL_OUTSIDESURFACECONVECTIONALGORITHM_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | namespace detail { | ||
| 16 | class OutsideSurfaceConvectionAlgorithm_Impl; | ||
| 17 | } // namespace detail | ||
| 18 | |||
| 19 | /** OutsideSurfaceConvectionAlgorithm derives from ModelObject and is an interface to the OpenStudio IDD object named "SurfaceConvectionAlgorithm:Outside". | ||
| 20 | * | ||
| 21 | * OutsideSurfaceConvectionAlgorithm is a unique object that specifies the global model used for surface convection at the outside face of all the | ||
| 22 | * heat transfer surfaces in the model. This global algorithm may be overridden for specific Surface, SurfaceList, or Zone objects. | ||
| 23 | * OutsideSurfaceConvectionAlgorithm does not have a public constructor because it is a unique ModelObject. | ||
| 24 | * To get the OutsideSurfaceConvectionAlgorithm object for a Model or create one if it does not yet exist use model.getUniqueObject<OutsideSurfaceConvectionAlgorithm>(). | ||
| 25 | * To get the OutsideSurfaceConvectionAlgorithm object for a Model but not create one if it does not yet exist use model.getOptionalUniqueObject<OutsideSurfaceConvectionAlgorithm>(). | ||
| 26 | */ | ||
| 27 | class MODEL_API OutsideSurfaceConvectionAlgorithm : public ModelObject | ||
| 28 | { | ||
| 29 | public: | ||
| 30 | 341 | virtual ~OutsideSurfaceConvectionAlgorithm() override = default; | |
| 31 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 32 | ✗ | OutsideSurfaceConvectionAlgorithm(const OutsideSurfaceConvectionAlgorithm& other) = default; | |
| 33 | 63 | OutsideSurfaceConvectionAlgorithm(OutsideSurfaceConvectionAlgorithm&& other) = default; | |
| 34 | ✗ | OutsideSurfaceConvectionAlgorithm& operator=(const OutsideSurfaceConvectionAlgorithm&) = default; | |
| 35 | ✗ | OutsideSurfaceConvectionAlgorithm& operator=(OutsideSurfaceConvectionAlgorithm&&) = default; | |
| 36 | |||
| 37 | /** @name Static Methods */ | ||
| 38 | //@{ | ||
| 39 | |||
| 40 | static IddObjectType iddObjectType(); | ||
| 41 | |||
| 42 | static std::vector<std::string> validAlgorithmValues(); | ||
| 43 | |||
| 44 | //@} | ||
| 45 | /** @name Getters */ | ||
| 46 | //@{ | ||
| 47 | |||
| 48 | std::string algorithm() const; | ||
| 49 | |||
| 50 | bool isAlgorithmDefaulted() const; | ||
| 51 | |||
| 52 | //@} | ||
| 53 | /** @name Setters */ | ||
| 54 | //@{ | ||
| 55 | |||
| 56 | bool setAlgorithm(const std::string& algorithm); | ||
| 57 | |||
| 58 | void resetAlgorithm(); | ||
| 59 | |||
| 60 | //@} | ||
| 61 | protected: | ||
| 62 | /** @name Constructors and Destructors */ | ||
| 63 | //@{ | ||
| 64 | |||
| 65 | /// Constructs a new OutsideSurfaceConvectionAlgorithm object in the model. | ||
| 66 | explicit OutsideSurfaceConvectionAlgorithm(const Model& model); | ||
| 67 | |||
| 68 | //@} | ||
| 69 | |||
| 70 | /// @cond | ||
| 71 | |||
| 72 | using ImplType = detail::OutsideSurfaceConvectionAlgorithm_Impl; | ||
| 73 | |||
| 74 | friend class Model; | ||
| 75 | friend class openstudio::IdfObject; | ||
| 76 | |||
| 77 | // constructor | ||
| 78 | explicit OutsideSurfaceConvectionAlgorithm(std::shared_ptr<detail::OutsideSurfaceConvectionAlgorithm_Impl> impl); | ||
| 79 | |||
| 80 | private: | ||
| 81 | REGISTER_LOGGER("openstudio.model.OutsideSurfaceConvectionAlgorithm"); | ||
| 82 | |||
| 83 | /// @endcond | ||
| 84 | }; | ||
| 85 | |||
| 86 | /** \relates OutsideSurfaceConvectionAlgorithm */ | ||
| 87 | using OptionalOutsideSurfaceConvectionAlgorithm = boost::optional<OutsideSurfaceConvectionAlgorithm>; | ||
| 88 | |||
| 89 | } // namespace model | ||
| 90 | } // namespace openstudio | ||
| 91 | |||
| 92 | #endif // MODEL_OUTSIDESURFACECONVECTIONALGORITHM_HPP | ||
| 93 |