src/model/ShadingSurfaceGroup_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_SHADINGSURFACEGROUP_IMPL_HPP | ||
| 7 | #define MODEL_SHADINGSURFACEGROUP_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "PlanarSurfaceGroup_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | class Transformation; | ||
| 15 | |||
| 16 | namespace model { | ||
| 17 | |||
| 18 | class Space; | ||
| 19 | class ShadingSurface; | ||
| 20 | class ShadingSurfaceGroup; | ||
| 21 | class Surface; | ||
| 22 | class SubSurface; | ||
| 23 | |||
| 24 | namespace detail { | ||
| 25 | |||
| 26 | /** ShadingSurfaceGroup_Impl is a PlanarSurfaceGroup_Impl that is the implementation class for ShadingSurfaceGroup.*/ | ||
| 27 | class MODEL_API ShadingSurfaceGroup_Impl : public PlanarSurfaceGroup_Impl | ||
| 28 | { | ||
| 29 | |||
| 30 | public: | ||
| 31 | /** @name Constructors and Destructors */ | ||
| 32 | //@{ | ||
| 33 | |||
| 34 | ShadingSurfaceGroup_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 35 | |||
| 36 | ShadingSurfaceGroup_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 37 | |||
| 38 | ShadingSurfaceGroup_Impl(const ShadingSurfaceGroup_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 39 | |||
| 40 | 1384 | virtual ~ShadingSurfaceGroup_Impl() override = default; | |
| 41 | |||
| 42 | //@} | ||
| 43 | |||
| 44 | // return the parent object in the hierarchy | ||
| 45 | virtual boost::optional<ParentObject> parent() const override; | ||
| 46 | |||
| 47 | // set the parent, child may have to call methods on the parent | ||
| 48 | virtual bool setParent(ParentObject& newParent) override; | ||
| 49 | |||
| 50 | // return any children objects in the hierarchy | ||
| 51 | virtual std::vector<ModelObject> children() const override; | ||
| 52 | |||
| 53 | /// get a vector of allowable children types | ||
| 54 | virtual std::vector<IddObjectType> allowableChildTypes() const override; | ||
| 55 | |||
| 56 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 57 | |||
| 58 | virtual IddObjectType iddObjectType() const override; | ||
| 59 | |||
| 60 | virtual openstudio::Transformation buildingTransformation() const override; | ||
| 61 | |||
| 62 | virtual bool changeTransformation(const openstudio::Transformation& transformation) override; | ||
| 63 | |||
| 64 | virtual openstudio::BoundingBox boundingBox() const override; | ||
| 65 | |||
| 66 | /** @name Getters */ | ||
| 67 | //@{ | ||
| 68 | |||
| 69 | std::string shadingSurfaceType() const; | ||
| 70 | |||
| 71 | virtual double directionofRelativeNorth() const override; | ||
| 72 | |||
| 73 | virtual bool isDirectionofRelativeNorthDefaulted() const override; | ||
| 74 | |||
| 75 | virtual double xOrigin() const override; | ||
| 76 | |||
| 77 | virtual bool isXOriginDefaulted() const override; | ||
| 78 | |||
| 79 | virtual double yOrigin() const override; | ||
| 80 | |||
| 81 | virtual bool isYOriginDefaulted() const override; | ||
| 82 | |||
| 83 | virtual double zOrigin() const override; | ||
| 84 | |||
| 85 | virtual bool isZOriginDefaulted() const override; | ||
| 86 | |||
| 87 | //@} | ||
| 88 | /** @name Setters */ | ||
| 89 | //@{ | ||
| 90 | |||
| 91 | bool setShadingSurfaceType(const std::string& shadingSurfaceType); | ||
| 92 | |||
| 93 | virtual bool setDirectionofRelativeNorth(double directionofRelativeNorth, bool driverMethod = true) override; | ||
| 94 | |||
| 95 | virtual void resetDirectionofRelativeNorth() override; | ||
| 96 | |||
| 97 | virtual bool setXOrigin(double xOrigin, bool driverMethod = true) override; | ||
| 98 | |||
| 99 | virtual void resetXOrigin() override; | ||
| 100 | |||
| 101 | virtual bool setYOrigin(double yOrigin, bool driverMethod = true) override; | ||
| 102 | |||
| 103 | virtual void resetYOrigin() override; | ||
| 104 | |||
| 105 | virtual bool setZOrigin(double zOrigin, bool driverMethod = true) override; | ||
| 106 | |||
| 107 | virtual void resetZOrigin() override; | ||
| 108 | |||
| 109 | //@} | ||
| 110 | |||
| 111 | /// Returns the parent Space. | ||
| 112 | boost::optional<Space> space() const; | ||
| 113 | |||
| 114 | /// Sets the parent Space. | ||
| 115 | bool setSpace(const Space& space); | ||
| 116 | |||
| 117 | /** If (space()), calls setShadingSurfaceType("Building") to remove the relationship. */ | ||
| 118 | void resetSpace(); | ||
| 119 | |||
| 120 | /// Returns child shading surfaces. | ||
| 121 | std::vector<ShadingSurface> shadingSurfaces() const; | ||
| 122 | |||
| 123 | /** Returns the specific sub surface shaded by this group if specified. */ | ||
| 124 | boost::optional<SubSurface> shadedSubSurface() const; | ||
| 125 | |||
| 126 | /** Returns the surface shaded by this group if specified. */ | ||
| 127 | boost::optional<Surface> shadedSurface() const; | ||
| 128 | |||
| 129 | /** Sets the specifc sub surface shaded by this group, sub surface must be in the same parent space. */ | ||
| 130 | bool setShadedSubSurface(const SubSurface& subSurface); | ||
| 131 | |||
| 132 | /** Sets the surface shaded by this group, surface must be in the same parent space. */ | ||
| 133 | bool setShadedSurface(const Surface& surface); | ||
| 134 | |||
| 135 | /** Resets the sub surface shaded by this group. */ | ||
| 136 | void resetShadedObject(); | ||
| 137 | |||
| 138 | protected: | ||
| 139 | private: | ||
| 140 | − | REGISTER_LOGGER("openstudio.model.ShadingSurfaceGroup"); | |
| 141 | |||
| 142 | boost::optional<ModelObject> spaceAsModelObject() const; | ||
| 143 | std::vector<ModelObject> shadingSurfacesAsModelObjects() const; | ||
| 144 | |||
| 145 | bool setSpaceAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 146 | }; | ||
| 147 | |||
| 148 | } // namespace detail | ||
| 149 | |||
| 150 | } // namespace model | ||
| 151 | } // namespace openstudio | ||
| 152 | |||
| 153 | #endif // MODEL_SHADINGSURFACEGROUP_IMPL_HPP | ||
| 154 |