src/model/ShadingSurface.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_SHADINGSURFACE_HPP | ||
| 7 | #define MODEL_SHADINGSURFACE_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "PlanarSurface.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class ShadingSurfaceGroup; | ||
| 16 | class Schedule; | ||
| 17 | class DaylightingDeviceShelf; | ||
| 18 | |||
| 19 | namespace detail { | ||
| 20 | |||
| 21 | class ShadingSurface_Impl; | ||
| 22 | |||
| 23 | } // namespace detail | ||
| 24 | |||
| 25 | /** ShadingSurface is a PlanarSurface that wraps the OpenStudio IDD object | ||
| 26 | * 'OS:ShadingSurface'. */ | ||
| 27 | class MODEL_API ShadingSurface : public PlanarSurface | ||
| 28 | { | ||
| 29 | public: | ||
| 30 | /** @name Constructors and Destructors */ | ||
| 31 | //@{ | ||
| 32 | |||
| 33 | explicit ShadingSurface(const std::vector<Point3d>& vertices, const Model& model); | ||
| 34 | |||
| 35 | 28470 | virtual ~ShadingSurface() override = default; | |
| 36 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 37 | ✗ | ShadingSurface(const ShadingSurface& other) = default; | |
| 38 | 13207 | ShadingSurface(ShadingSurface&& other) = default; | |
| 39 | ✗ | ShadingSurface& operator=(const ShadingSurface&) = default; | |
| 40 | 5339 | ShadingSurface& operator=(ShadingSurface&&) = default; | |
| 41 | |||
| 42 | //@} | ||
| 43 | /** @name Static Methods */ | ||
| 44 | //@{ | ||
| 45 | |||
| 46 | static IddObjectType iddObjectType(); | ||
| 47 | |||
| 48 | //@} | ||
| 49 | /** @name Getters */ | ||
| 50 | //@{ | ||
| 51 | |||
| 52 | /// get the shading group | ||
| 53 | boost::optional<ShadingSurfaceGroup> shadingSurfaceGroup() const; | ||
| 54 | |||
| 55 | // get the transmittance schedule | ||
| 56 | boost::optional<Schedule> transmittanceSchedule() const; | ||
| 57 | |||
| 58 | boost::optional<double> numberofVertices() const; | ||
| 59 | |||
| 60 | bool isNumberofVerticesDefaulted() const; | ||
| 61 | |||
| 62 | bool isNumberofVerticesAutocalculated() const; | ||
| 63 | |||
| 64 | //@} | ||
| 65 | /** @name Setters */ | ||
| 66 | //@{ | ||
| 67 | |||
| 68 | /// set the exterior shading group | ||
| 69 | bool setShadingSurfaceGroup(const ShadingSurfaceGroup& shadingSurfaceGroup); | ||
| 70 | |||
| 71 | void resetShadingSurfaceGroup(); | ||
| 72 | |||
| 73 | /// set the transmittance schedule | ||
| 74 | bool setTransmittanceSchedule(Schedule& transmittanceSchedule); | ||
| 75 | |||
| 76 | /// reset the transmittance schedule | ||
| 77 | void resetTransmittanceSchedule(); | ||
| 78 | |||
| 79 | bool setNumberofVertices(boost::optional<double> numberofVertices); | ||
| 80 | |||
| 81 | bool setNumberofVertices(double numberofVertices); | ||
| 82 | |||
| 83 | void resetNumberofVertices(); | ||
| 84 | |||
| 85 | void autocalculateNumberofVertices(); | ||
| 86 | |||
| 87 | //@} | ||
| 88 | |||
| 89 | boost::optional<DaylightingDeviceShelf> daylightingDeviceShelf() const; | ||
| 90 | |||
| 91 | protected: | ||
| 92 | /// @cond | ||
| 93 | using ImplType = detail::ShadingSurface_Impl; | ||
| 94 | |||
| 95 | friend class Model; | ||
| 96 | friend class openstudio::IdfObject; | ||
| 97 | friend class openstudio::detail::IdfObject_Impl; | ||
| 98 | |||
| 99 | explicit ShadingSurface(std::shared_ptr<detail::ShadingSurface_Impl> impl); | ||
| 100 | |||
| 101 | /// @endcond | ||
| 102 | private: | ||
| 103 | REGISTER_LOGGER("openstudio.model.ShadingSurface"); | ||
| 104 | }; | ||
| 105 | |||
| 106 | /** \relates ShadingSurface*/ | ||
| 107 | using OptionalShadingSurface = boost::optional<ShadingSurface>; | ||
| 108 | |||
| 109 | /** \relates ShadingSurface*/ | ||
| 110 | using ShadingSurfaceVector = std::vector<ShadingSurface>; | ||
| 111 | |||
| 112 | } // namespace model | ||
| 113 | } // namespace openstudio | ||
| 114 | |||
| 115 | #endif // MODEL_SHADINGSURFACE_HPP | ||
| 116 |