src/model/StandardsInformationConstruction.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_STANDARDSINFORMATIONCONSTRUCTION_HPP | ||
| 7 | #define MODEL_STANDARDSINFORMATIONCONSTRUCTION_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class ConstructionBase; | ||
| 16 | class Material; | ||
| 17 | |||
| 18 | namespace detail { | ||
| 19 | class ConstructionBase_Impl; | ||
| 20 | class StandardsInformationConstruction_Impl; | ||
| 21 | } // namespace detail | ||
| 22 | |||
| 23 | /** StandardsInformationConstruction is the ModelObject that wraps OpenStudio IDD object | ||
| 24 | * 'OS:StandardsInformation:ConstructionFields'. StandardsInformationConstruction provides a | ||
| 25 | * place to register information about a construction that building energy standards often need | ||
| 26 | * to know, but is irrelevant to simulation. It contains user-specified values that are not | ||
| 27 | * generally checked against input or output data. */ | ||
| 28 | class MODEL_API StandardsInformationConstruction : public ModelObject | ||
| 29 | { | ||
| 30 | public: | ||
| 31 | /** @name Constructors and Destructors */ | ||
| 32 | //@{ | ||
| 33 | |||
| 34 | 1520 | virtual ~StandardsInformationConstruction() override = default; | |
| 35 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 36 | 272 | StandardsInformationConstruction(const StandardsInformationConstruction& other) = default; | |
| 37 | 267 | StandardsInformationConstruction(StandardsInformationConstruction&& other) = default; | |
| 38 | ✗ | StandardsInformationConstruction& operator=(const StandardsInformationConstruction&) = default; | |
| 39 | ✗ | StandardsInformationConstruction& operator=(StandardsInformationConstruction&&) = default; | |
| 40 | |||
| 41 | //@} | ||
| 42 | /** @name Static Methods */ | ||
| 43 | //@{ | ||
| 44 | |||
| 45 | static std::vector<std::string> standardPerturbableLayerTypeValues(); | ||
| 46 | |||
| 47 | static std::vector<std::string> fenestrationTypeValues(); | ||
| 48 | |||
| 49 | static std::vector<std::string> fenestrationAssemblyContextValues(); | ||
| 50 | |||
| 51 | static std::vector<std::string> fenestrationNumberOfPanesValues(); | ||
| 52 | |||
| 53 | static std::vector<std::string> fenestrationFrameTypeValues(); | ||
| 54 | |||
| 55 | static std::vector<std::string> fenestrationDividerTypeValues(); | ||
| 56 | |||
| 57 | static std::vector<std::string> fenestrationTintValues(); | ||
| 58 | |||
| 59 | static std::vector<std::string> fenestrationGasFillValues(); | ||
| 60 | |||
| 61 | static std::vector<std::string> intendedSurfaceTypeValues(); | ||
| 62 | |||
| 63 | static IddObjectType iddObjectType(); | ||
| 64 | |||
| 65 | //@} | ||
| 66 | /** @name Getters */ | ||
| 67 | //@{ | ||
| 68 | |||
| 69 | /** Return the ConstructionBase object that this object describes. */ | ||
| 70 | ConstructionBase construction() const; | ||
| 71 | |||
| 72 | /** Return the surface type to which this construction should be applied. */ | ||
| 73 | boost::optional<std::string> intendedSurfaceType() const; | ||
| 74 | |||
| 75 | /** This is a freeform field used to identify the construction type for standards. | ||
| 76 | \note Standards applied to this model will use this field to determine correct constructions. | ||
| 77 | \note More information can be found at https://github.com/NREL/openstudio-standards. */ | ||
| 78 | boost::optional<std::string> standardsConstructionType() const; | ||
| 79 | |||
| 80 | /** Returns a list of suggestions for standards construction type based on intendedSurfaceType. */ | ||
| 81 | std::vector<std::string> suggestedStandardsConstructionTypes() const; | ||
| 82 | |||
| 83 | /** Return the layer of construction() whose thickness can be perturbed (usually to reach a | ||
| 84 | * certain property value for the overall construction), if the construction() exists and is a | ||
| 85 | * LayeredConstruction. */ | ||
| 86 | boost::optional<Material> perturbableLayer() const; | ||
| 87 | |||
| 88 | /** Return a description of the perturbableLayer(), for instance, 'Insulation'.*/ | ||
| 89 | boost::optional<std::string> perturbableLayerType() const; | ||
| 90 | |||
| 91 | bool isPerturbableLayerTypeDefaulted() const; | ||
| 92 | |||
| 93 | boost::optional<std::string> otherPerturbableLayerType() const; | ||
| 94 | |||
| 95 | /** Returns a list of suggestions for construction standard. */ | ||
| 96 | std::vector<std::string> suggestedConstructionStandards() const; | ||
| 97 | |||
| 98 | /** Identifies the standard which specifies this construction.*/ | ||
| 99 | boost::optional<std::string> constructionStandard() const; | ||
| 100 | |||
| 101 | /** Returns a list of suggestions for construction standard source based on construction standard. */ | ||
| 102 | std::vector<std::string> suggestedConstructionStandardSources() const; | ||
| 103 | |||
| 104 | /** Identifies the table or section in standard which specifies this construction. */ | ||
| 105 | boost::optional<std::string> constructionStandardSource() const; | ||
| 106 | |||
| 107 | /** Specific type of fenestration that this construction represents. */ | ||
| 108 | boost::optional<std::string> fenestrationType() const; | ||
| 109 | |||
| 110 | /** Where the fenestration assembled. */ | ||
| 111 | boost::optional<std::string> fenestrationAssemblyContext() const; | ||
| 112 | |||
| 113 | /** Number of panes for this fenestration construction. */ | ||
| 114 | boost::optional<std::string> fenestrationNumberOfPanes() const; | ||
| 115 | |||
| 116 | /** Type of framing for this fenestration construction. */ | ||
| 117 | boost::optional<std::string> fenestrationFrameType() const; | ||
| 118 | |||
| 119 | /** Type of divider for this fenestration construction. */ | ||
| 120 | boost::optional<std::string> fenestrationDividerType() const; | ||
| 121 | |||
| 122 | /** Tint of this fenestration construction. */ | ||
| 123 | boost::optional<std::string> fenestrationTint() const; | ||
| 124 | |||
| 125 | /** Type of gas used between panes of this fenestration construction. */ | ||
| 126 | boost::optional<std::string> fenestrationGasFill() const; | ||
| 127 | |||
| 128 | /** Does this fenestration construction include a low-e coating. */ | ||
| 129 | bool fenestrationLowEmissivityCoating() const; | ||
| 130 | |||
| 131 | //@} | ||
| 132 | /** @name Setters */ | ||
| 133 | //@ | ||
| 134 | |||
| 135 | /** Sets the intendedSurfaceType to type. \sa intendedSurfaceTypeValues */ | ||
| 136 | bool setIntendedSurfaceType(const std::string& type); | ||
| 137 | void resetIntendedSurfaceType(); | ||
| 138 | |||
| 139 | /** Set the constructionType to type. To be used with standardsinterface, this string should | ||
| 140 | * match an appropriate enumeration value in the standardsinterface::DataDictionary. The | ||
| 141 | * enumeration for which this should be a value generally varies by intendedSurfaceType(). */ | ||
| 142 | bool setStandardsConstructionType(const std::string& type); | ||
| 143 | void resetStandardsConstructionType(); | ||
| 144 | |||
| 145 | /** Set the perturbableLayer to the one at layerIndex. Returns false if construction() is not a | ||
| 146 | * LayeredConstruction or | ||
| 147 | * | ||
| 148 | * \code | ||
| 149 | * layerIndex >= construction().get().cast<LayeredConstruction>().numLayers(). | ||
| 150 | * \endcode */ | ||
| 151 | bool setPerturbableLayer(unsigned layerIndex); | ||
| 152 | |||
| 153 | /** Set the perturbableLayer to material. Returns false if construction() is not a | ||
| 154 | * LayeredConstruction or | ||
| 155 | * | ||
| 156 | * \code | ||
| 157 | * MaterialVector layers = construction().get().cast<LayeredConstruction>().layers(); | ||
| 158 | * std::find(layers.begin(),layers.end(),material) == layers.end(); | ||
| 159 | * \endcode */ | ||
| 160 | bool setPerturbableLayer(const Material& material); | ||
| 161 | |||
| 162 | /** Clears all PerturbableLayer information, including type. */ | ||
| 163 | void resetPerturbableLayer(); | ||
| 164 | |||
| 165 | /** Set the perturbableLayerType to type. Can be one of the provided types, or a free-form | ||
| 166 | * string. \sa standardPerturbableLayerTypeValues */ | ||
| 167 | bool setPerturbableLayerType(const std::string& type); | ||
| 168 | void resetPerturbableLayerType(); | ||
| 169 | |||
| 170 | bool setOtherPerturbableLayerType(const std::string& otherPerturbableLayerType); | ||
| 171 | void resetOtherPerturbableLayerType(); | ||
| 172 | |||
| 173 | bool setConstructionStandard(const std::string& constructionStandard); | ||
| 174 | |||
| 175 | void resetConstructionStandard(); | ||
| 176 | |||
| 177 | bool setConstructionStandardSource(const std::string& constructionStandardSource); | ||
| 178 | |||
| 179 | void resetConstructionStandardSource(); | ||
| 180 | |||
| 181 | bool setFenestrationType(const std::string& fenestrationType); | ||
| 182 | |||
| 183 | void resetFenestrationType(); | ||
| 184 | |||
| 185 | bool setFenestrationAssemblyContext(const std::string& fenestrationAssemblyContext); | ||
| 186 | |||
| 187 | void resetFenestrationAssemblyContext(); | ||
| 188 | |||
| 189 | bool setFenestrationNumberOfPanes(const std::string& fenestrationNumberofPanes); | ||
| 190 | |||
| 191 | void resetFenestrationNumberOfPanes(); | ||
| 192 | |||
| 193 | bool setFenestrationFrameType(const std::string& fenestrationFrameType); | ||
| 194 | |||
| 195 | void resetFenestrationFrameType(); | ||
| 196 | |||
| 197 | bool setFenestrationDividerType(const std::string& fenestrationDividerType); | ||
| 198 | |||
| 199 | void resetFenestrationDividerType(); | ||
| 200 | |||
| 201 | bool setFenestrationTint(const std::string& fenestrationTint); | ||
| 202 | |||
| 203 | void resetFenestrationTint(); | ||
| 204 | |||
| 205 | bool setFenestrationGasFill(const std::string& fenestrationGasFill); | ||
| 206 | |||
| 207 | void resetFenestrationGasFill(); | ||
| 208 | |||
| 209 | bool setFenestrationLowEmissivityCoating(bool fenestrationLowEmissivityCoating); | ||
| 210 | |||
| 211 | void setFenestrationLowEmissivityCoatingNoFail(bool fenestrationLowEmissivityCoating); | ||
| 212 | |||
| 213 | void resetFenestrationLowEmissivityCoating(); | ||
| 214 | |||
| 215 | //@} | ||
| 216 | protected: | ||
| 217 | /// @cond | ||
| 218 | using ImplType = detail::StandardsInformationConstruction_Impl; | ||
| 219 | |||
| 220 | friend class Model; | ||
| 221 | friend class openstudio::IdfObject; | ||
| 222 | friend class openstudio::detail::IdfObject_Impl; | ||
| 223 | friend class detail::StandardsInformationConstruction_Impl; | ||
| 224 | friend class detail::ConstructionBase_Impl; | ||
| 225 | |||
| 226 | /** Create new object as child of construction. */ | ||
| 227 | explicit StandardsInformationConstruction(const ConstructionBase& construction); | ||
| 228 | |||
| 229 | explicit StandardsInformationConstruction(std::shared_ptr<detail::StandardsInformationConstruction_Impl> impl); | ||
| 230 | /// @endcond | ||
| 231 | private: | ||
| 232 | REGISTER_LOGGER("openstudio.model.StandardsInformationConstruction"); | ||
| 233 | }; | ||
| 234 | |||
| 235 | /** \relates StandardsInformationConstruction */ | ||
| 236 | using OptionalStandardsInformationConstruction = boost::optional<StandardsInformationConstruction>; | ||
| 237 | |||
| 238 | /** \relates StandardsInformationConstruction */ | ||
| 239 | using StandardsInformationConstructionVector = std::vector<StandardsInformationConstruction>; | ||
| 240 | |||
| 241 | } // namespace model | ||
| 242 | } // namespace openstudio | ||
| 243 | |||
| 244 | #endif // MODEL_STANDARDSINFORMATIONCONSTRUCTION_HPP | ||
| 245 |