src/model/SurfacePropertySurroundingSurfaces_Impl.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_SURFACEPROPERTYSURROUNDINGSURFACES_IMPL_HPP | ||
| 7 | #define MODEL_SURFACEPROPERTYSURROUNDINGSURFACES_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class Schedule; | ||
| 16 | class SurroundingSurfaceGroup; | ||
| 17 | class SurfacePropertyLocalEnvironment; | ||
| 18 | |||
| 19 | namespace detail { | ||
| 20 | |||
| 21 | /** SurfacePropertySurroundingSurfaces_Impl is a ModelObject_Impl that is the implementation class for SurfacePropertySurroundingSurfaces.*/ | ||
| 22 | class MODEL_API SurfacePropertySurroundingSurfaces_Impl : public ModelObject_Impl | ||
| 23 | { | ||
| 24 | public: | ||
| 25 | /** @name Constructors and Destructors */ | ||
| 26 | //@{ | ||
| 27 | |||
| 28 | SurfacePropertySurroundingSurfaces_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 29 | |||
| 30 | SurfacePropertySurroundingSurfaces_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 31 | |||
| 32 | SurfacePropertySurroundingSurfaces_Impl(const SurfacePropertySurroundingSurfaces_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 33 | |||
| 34 | 12 | virtual ~SurfacePropertySurroundingSurfaces_Impl() override = default; | |
| 35 | |||
| 36 | //@} | ||
| 37 | /** @name Virtual Methods */ | ||
| 38 | //@{ | ||
| 39 | |||
| 40 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 41 | |||
| 42 | virtual IddObjectType iddObjectType() const override; | ||
| 43 | |||
| 44 | virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override; | ||
| 45 | |||
| 46 | //@} | ||
| 47 | /** @name Getters */ | ||
| 48 | //@{ | ||
| 49 | |||
| 50 | boost::optional<double> skyViewFactor() const; | ||
| 51 | bool isSkyViewFactorAutocalculated() const; | ||
| 52 | |||
| 53 | boost::optional<Schedule> skyTemperatureSchedule() const; | ||
| 54 | |||
| 55 | boost::optional<double> groundViewFactor() const; | ||
| 56 | bool isGroundViewFactorAutocalculated() const; | ||
| 57 | |||
| 58 | boost::optional<Schedule> groundTemperatureSchedule() const; | ||
| 59 | |||
| 60 | //@} | ||
| 61 | /** @name Setters */ | ||
| 62 | //@{ | ||
| 63 | |||
| 64 | bool setSkyViewFactor(double skyViewFactor); | ||
| 65 | void autocalculateSkyViewFactor(); | ||
| 66 | |||
| 67 | bool setSkyTemperatureSchedule(Schedule& schedule); | ||
| 68 | void resetSkyTemperatureSchedule(); | ||
| 69 | |||
| 70 | bool setGroundViewFactor(double groundViewFactor); | ||
| 71 | void autocalculateGroundViewFactor(); | ||
| 72 | |||
| 73 | bool setGroundTemperatureSchedule(Schedule& schedule); | ||
| 74 | void resetGroundTemperatureSchedule(); | ||
| 75 | |||
| 76 | //@} | ||
| 77 | /** @name Other */ | ||
| 78 | //@{ | ||
| 79 | |||
| 80 | boost::optional<SurfacePropertyLocalEnvironment> surfacePropertyLocalEnvironment() const; | ||
| 81 | |||
| 82 | std::vector<SurroundingSurfaceGroup> surroundingSurfaceGroups() const; | ||
| 83 | |||
| 84 | unsigned int numberofSurroundingSurfaceGroups() const; | ||
| 85 | |||
| 86 | /** Looks up by Surface Name (case-insensitive) */ | ||
| 87 | boost::optional<unsigned> surroundingSurfaceGroupIndex(const SurroundingSurfaceGroup& surroundingSurfaceGroup) const; | ||
| 88 | boost::optional<unsigned> surroundingSurfaceGroupIndex(const std::string& surroundingSurfaceName) const; | ||
| 89 | |||
| 90 | boost::optional<SurroundingSurfaceGroup> getSurroundingSurfaceGroup(unsigned groupIndex) const; | ||
| 91 | |||
| 92 | /** If a surroundingSurfaceGroup group is already present (cf `surroundingSurfaceGroupIndex()`), it will Warn and override the surroundingSurfaceGroup value */ | ||
| 93 | bool addSurroundingSurfaceGroup(const SurroundingSurfaceGroup& surroundingSurfaceGroup); | ||
| 94 | |||
| 95 | // Overloads, it creates a SurroundingSurfaceGroup wrapper, then call `addSurroundingSurfaceGroup(const SurroundingSurfaceGroup& surroundingSurfaceGroup)` | ||
| 96 | bool addSurroundingSurfaceGroup(const std::string& surroundingSurfaceName, double viewFactor, const Schedule& temperatureSchedule); | ||
| 97 | |||
| 98 | bool addSurroundingSurfaceGroups(const std::vector<SurroundingSurfaceGroup>& surroundingSurfaceGroups); | ||
| 99 | |||
| 100 | bool removeSurroundingSurfaceGroup(unsigned groupIndex); | ||
| 101 | |||
| 102 | void removeAllSurroundingSurfaceGroups(); | ||
| 103 | |||
| 104 | //@} | ||
| 105 | protected: | ||
| 106 | private: | ||
| 107 | − | REGISTER_LOGGER("openstudio.model.SurfacePropertySurroundingSurfaces"); | |
| 108 | }; | ||
| 109 | |||
| 110 | } // namespace detail | ||
| 111 | |||
| 112 | } // namespace model | ||
| 113 | } // namespace openstudio | ||
| 114 | |||
| 115 | #endif // MODEL_SURFACEPROPERTYSURROUNDINGSURFACES_IMPL_HPP | ||
| 116 |