src/model/ShadingControl_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_SHADINGCONTROL_IMPL_HPP | ||
| 7 | #define MODEL_SHADINGCONTROL_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ResourceObject_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class Construction; | ||
| 16 | class ShadingMaterial; | ||
| 17 | class Schedule; | ||
| 18 | class SubSurface; | ||
| 19 | |||
| 20 | namespace detail { | ||
| 21 | |||
| 22 | /** ShadingControl_Impl is a ResourceObject_Impl that is the implementation class for ShadingControl.*/ | ||
| 23 | class MODEL_API ShadingControl_Impl : public ResourceObject_Impl | ||
| 24 | { | ||
| 25 | public: | ||
| 26 | /** @name Constructors and Destructors */ | ||
| 27 | //@{ | ||
| 28 | |||
| 29 | ShadingControl_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 30 | |||
| 31 | ShadingControl_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 32 | |||
| 33 | ShadingControl_Impl(const ShadingControl_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 34 | |||
| 35 | 37 | virtual ~ShadingControl_Impl() override = default; | |
| 36 | |||
| 37 | //@} | ||
| 38 | |||
| 39 | /** @name Virtual Methods */ | ||
| 40 | //@{ | ||
| 41 | |||
| 42 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 43 | |||
| 44 | virtual IddObjectType iddObjectType() const override; | ||
| 45 | |||
| 46 | // If cloning in the same model, will keep on referencing the same SubSurfaces as the original | ||
| 47 | // If cloning in another model, will clear out its extensible Sub Surface Name group | ||
| 48 | virtual ModelObject clone(Model model) const override; | ||
| 49 | |||
| 50 | //@} | ||
| 51 | |||
| 52 | static bool isControlTypeValueNeedingSetpoint1(const std::string& controlType); | ||
| 53 | static bool isControlTypeValueNeedingSetpoint2(const std::string& controlType); | ||
| 54 | |||
| 55 | // **Allows** a schedule | ||
| 56 | static bool isControlTypeValueAllowingSchedule(const std::string& controlType); | ||
| 57 | // **Requires** a Schedule | ||
| 58 | static bool isControlTypeValueRequiringSchedule(const std::string& controlType); | ||
| 59 | |||
| 60 | // **Allows** a slat angle control | ||
| 61 | static bool isTypeValueAllowingSlatAngleControl(const std::string& type); | ||
| 62 | |||
| 63 | /** @name Getters */ | ||
| 64 | //@{ | ||
| 65 | |||
| 66 | std::string shadingType() const; | ||
| 67 | |||
| 68 | boost::optional<Construction> construction() const; | ||
| 69 | |||
| 70 | boost::optional<ShadingMaterial> shadingMaterial() const; | ||
| 71 | |||
| 72 | std::string shadingControlType() const; | ||
| 73 | |||
| 74 | bool isShadingControlTypeDefaulted() const; | ||
| 75 | |||
| 76 | boost::optional<Schedule> schedule() const; | ||
| 77 | |||
| 78 | boost::optional<double> setpoint() const; | ||
| 79 | |||
| 80 | bool isSetpointDefaulted() const; | ||
| 81 | |||
| 82 | bool glareControlIsActive() const; | ||
| 83 | |||
| 84 | std::string typeofSlatAngleControlforBlinds() const; | ||
| 85 | |||
| 86 | bool isTypeofSlatAngleControlforBlindsDefaulted() const; | ||
| 87 | |||
| 88 | boost::optional<Schedule> slatAngleSchedule() const; | ||
| 89 | |||
| 90 | boost::optional<double> setpoint2() const; | ||
| 91 | |||
| 92 | std::string multipleSurfaceControlType() const; | ||
| 93 | |||
| 94 | //@} | ||
| 95 | /** @name Setters */ | ||
| 96 | //@{ | ||
| 97 | |||
| 98 | bool setShadingType(const std::string& shadingType); | ||
| 99 | |||
| 100 | bool setShadingControlType(const std::string& shadingControlType); | ||
| 101 | |||
| 102 | void resetShadingControlType(); | ||
| 103 | |||
| 104 | bool setSchedule(const Schedule& schedule); | ||
| 105 | |||
| 106 | void resetSchedule(); | ||
| 107 | |||
| 108 | bool setSetpoint(double setpoint); | ||
| 109 | |||
| 110 | void resetSetpoint(); | ||
| 111 | |||
| 112 | bool setGlareControlIsActive(bool glareControlIsActive); | ||
| 113 | |||
| 114 | void resetGlareControlIsActive(); | ||
| 115 | |||
| 116 | bool setTypeofSlatAngleControlforBlinds(const std::string& typeofSlatAngleControlforBlinds); | ||
| 117 | |||
| 118 | void resetTypeofSlatAngleControlforBlinds(); | ||
| 119 | |||
| 120 | bool setSlatAngleSchedule(const Schedule& slatAngleSchedule); | ||
| 121 | |||
| 122 | void resetSlatAngleSchedule(); | ||
| 123 | |||
| 124 | bool setSetpoint2(double setpoint2); | ||
| 125 | |||
| 126 | // Impl only | ||
| 127 | void resetSetpoint2(); | ||
| 128 | |||
| 129 | bool setMultipleSurfaceControlType(const std::string& multipleSurfaceControlType); | ||
| 130 | |||
| 131 | //@} | ||
| 132 | /** @name Other */ | ||
| 133 | //@{ | ||
| 134 | |||
| 135 | // Extensible: Surfaces | ||
| 136 | std::vector<SubSurface> subSurfaces() const; | ||
| 137 | unsigned numberofSubSurfaces() const; | ||
| 138 | boost::optional<unsigned> subSurfaceIndex(const SubSurface& subSurface) const; | ||
| 139 | |||
| 140 | bool addSubSurface(const SubSurface& subSurface); | ||
| 141 | bool addSubSurface(const SubSurface& subSurface, unsigned index); | ||
| 142 | bool setSubSurfaceIndex(const SubSurface& subSurface, unsigned index); | ||
| 143 | bool removeSubSurface(const SubSurface& subSurface); | ||
| 144 | bool removeSubSurface(unsigned index); | ||
| 145 | // Bulk operations | ||
| 146 | bool addSubSurfaces(const std::vector<SubSurface>& subSurfaces); | ||
| 147 | // Clears existing first, then bulk add | ||
| 148 | bool setSubSurfaces(const std::vector<SubSurface>& subSurfaces); | ||
| 149 | void removeAllSubSurfaces(); | ||
| 150 | |||
| 151 | //@} | ||
| 152 | protected: | ||
| 153 | private: | ||
| 154 | − | REGISTER_LOGGER("openstudio.model.ShadingControl"); | |
| 155 | }; | ||
| 156 | |||
| 157 | } // namespace detail | ||
| 158 | |||
| 159 | } // namespace model | ||
| 160 | } // namespace openstudio | ||
| 161 | |||
| 162 | #endif // MODEL_SHADINGCONTROL_IMPL_HPP | ||
| 163 |