src/model/FoundationKiva.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_FOUNDATIONKIVA_HPP | ||
| 7 | #define MODEL_FOUNDATIONKIVA_HPP | ||
| 8 | |||
| 9 | #include <vector> | ||
| 10 | #include "ModelAPI.hpp" | ||
| 11 | #include "ModelObject.hpp" | ||
| 12 | |||
| 13 | #include "Material.hpp" | ||
| 14 | #include "Material_Impl.hpp" | ||
| 15 | #include "ConstructionBase.hpp" | ||
| 16 | #include "ConstructionBase_Impl.hpp" | ||
| 17 | #include "Surface.hpp" | ||
| 18 | #include "Surface_Impl.hpp" | ||
| 19 | |||
| 20 | namespace openstudio { | ||
| 21 | namespace model { | ||
| 22 | |||
| 23 | class Material; | ||
| 24 | class ConstructionBase; | ||
| 25 | class Surface; | ||
| 26 | |||
| 27 | namespace detail { | ||
| 28 | |||
| 29 | class FoundationKiva_Impl; | ||
| 30 | |||
| 31 | } // namespace detail | ||
| 32 | |||
| 33 | /** This class implements a custom block */ | ||
| 34 | class MODEL_API CustomBlock | ||
| 35 | { | ||
| 36 | public: | ||
| 37 | CustomBlock(const Material& material, double depth, double xPosition, double zPosition); | ||
| 38 | |||
| 39 | Material material() const; | ||
| 40 | double depth() const; | ||
| 41 | double xPosition() const; | ||
| 42 | double zPosition() const; | ||
| 43 | |||
| 44 | private: | ||
| 45 | Material m_material; | ||
| 46 | double m_depth; | ||
| 47 | double m_xPosition; | ||
| 48 | double m_zPosition; | ||
| 49 | − | REGISTER_LOGGER("openstudio.model.CustomBlock"); | |
| 50 | }; | ||
| 51 | |||
| 52 | // Overload operator<< | ||
| 53 | MODEL_API std::ostream& operator<<(std::ostream& out, const openstudio::model::CustomBlock& customBlock); | ||
| 54 | |||
| 55 | /** FoundationKiva is a ModelObject that wraps the OpenStudio IDD object 'OS:Foundation:Kiva'. */ | ||
| 56 | class MODEL_API FoundationKiva : public ModelObject | ||
| 57 | { | ||
| 58 | public: | ||
| 59 | /** @name Constructors and Destructors */ | ||
| 60 | //@{ | ||
| 61 | |||
| 62 | explicit FoundationKiva(Model& model); | ||
| 63 | |||
| 64 | 47 | virtual ~FoundationKiva() override = default; | |
| 65 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 66 | 1 | FoundationKiva(const FoundationKiva& other) = default; | |
| 67 | 19 | FoundationKiva(FoundationKiva&& other) = default; | |
| 68 | ✗ | FoundationKiva& operator=(const FoundationKiva&) = default; | |
| 69 | ✗ | FoundationKiva& operator=(FoundationKiva&&) = default; | |
| 70 | |||
| 71 | //@} | ||
| 72 | |||
| 73 | static IddObjectType iddObjectType(); | ||
| 74 | |||
| 75 | //extensible fields | ||
| 76 | |||
| 77 | bool addCustomBlock(const CustomBlock& customBlock); | ||
| 78 | |||
| 79 | bool addCustomBlock(const Material& material, double depth, double xPosition, double zPosition); | ||
| 80 | |||
| 81 | void removeCustomBlock(int groupIndex); | ||
| 82 | |||
| 83 | void removeAllCustomBlocks(); | ||
| 84 | |||
| 85 | std::vector<CustomBlock> customBlocks() const; | ||
| 86 | |||
| 87 | bool addCustomBlocks(const std::vector<CustomBlock>& customBlocks); | ||
| 88 | |||
| 89 | /** @name Getters */ | ||
| 90 | //@{ | ||
| 91 | |||
| 92 | boost::optional<double> initialIndoorAirTemperature(); | ||
| 93 | |||
| 94 | boost::optional<Material> interiorHorizontalInsulationMaterial() const; | ||
| 95 | |||
| 96 | double interiorHorizontalInsulationDepth() const; | ||
| 97 | |||
| 98 | bool isInteriorHorizontalInsulationDepthDefaulted() const; | ||
| 99 | |||
| 100 | boost::optional<double> interiorHorizontalInsulationWidth(); | ||
| 101 | |||
| 102 | boost::optional<Material> interiorVerticalInsulationMaterial() const; | ||
| 103 | |||
| 104 | boost::optional<double> interiorVerticalInsulationDepth(); | ||
| 105 | |||
| 106 | boost::optional<Material> exteriorHorizontalInsulationMaterial() const; | ||
| 107 | |||
| 108 | boost::optional<double> exteriorHorizontalInsulationDepth(); | ||
| 109 | |||
| 110 | double exteriorHorizontalInsulationWidth() const; | ||
| 111 | |||
| 112 | bool isExteriorHorizontalInsulationWidthDefaulted() const; | ||
| 113 | |||
| 114 | boost::optional<Material> exteriorVerticalInsulationMaterial() const; | ||
| 115 | |||
| 116 | boost::optional<double> exteriorVerticalInsulationDepth(); | ||
| 117 | |||
| 118 | double wallHeightAboveGrade() const; | ||
| 119 | |||
| 120 | bool isWallHeightAboveGradeDefaulted() const; | ||
| 121 | |||
| 122 | double wallDepthBelowSlab() const; | ||
| 123 | |||
| 124 | bool isWallDepthBelowSlabDefaulted() const; | ||
| 125 | |||
| 126 | boost::optional<ConstructionBase> footingWallConstruction() const; | ||
| 127 | |||
| 128 | boost::optional<Material> footingMaterial() const; | ||
| 129 | |||
| 130 | double footingDepth() const; | ||
| 131 | |||
| 132 | bool isFootingDepthDefaulted() const; | ||
| 133 | |||
| 134 | std::vector<Surface> surfaces() const; | ||
| 135 | |||
| 136 | unsigned int numberofCustomBlocks() const; | ||
| 137 | |||
| 138 | //@} | ||
| 139 | /** @name Setters */ | ||
| 140 | //@{ | ||
| 141 | |||
| 142 | bool setInitialIndoorAirTemperature(double initialIndoorAirTemperature); | ||
| 143 | |||
| 144 | bool setInteriorHorizontalInsulationMaterial(const Material& material); | ||
| 145 | |||
| 146 | void resetInteriorHorizontalInsulationMaterial(); | ||
| 147 | |||
| 148 | bool setInteriorHorizontalInsulationDepth(double interiorHorizontalInsulationDepth); | ||
| 149 | |||
| 150 | void resetInteriorHorizontalInsulationDepth(); | ||
| 151 | |||
| 152 | bool setInteriorHorizontalInsulationWidth(double interiorHorizontalInsulationWidth); | ||
| 153 | |||
| 154 | bool setInteriorVerticalInsulationMaterial(const Material& material); | ||
| 155 | |||
| 156 | void resetInteriorVerticalInsulationMaterial(); | ||
| 157 | |||
| 158 | bool setInteriorVerticalInsulationDepth(double interiorVerticalInsulationDepth); | ||
| 159 | |||
| 160 | bool setExteriorHorizontalInsulationMaterial(const Material& material); | ||
| 161 | |||
| 162 | void resetExteriorHorizontalInsulationMaterial(); | ||
| 163 | |||
| 164 | bool setExteriorHorizontalInsulationDepth(double exteriorHorizontalInsulationDepth); | ||
| 165 | |||
| 166 | bool setExteriorHorizontalInsulationWidth(double exteriorHorizontalInsulationWidth); | ||
| 167 | |||
| 168 | void resetExteriorHorizontalInsulationWidth(); | ||
| 169 | |||
| 170 | bool setExteriorVerticalInsulationMaterial(const Material& material); | ||
| 171 | |||
| 172 | void resetExteriorVerticalInsulationMaterial(); | ||
| 173 | |||
| 174 | bool setExteriorVerticalInsulationDepth(double exteriorVerticalInsulationDepth); | ||
| 175 | |||
| 176 | bool setWallHeightAboveGrade(double wallHeightAboveGrade); | ||
| 177 | |||
| 178 | void resetWallHeightAboveGrade(); | ||
| 179 | |||
| 180 | bool setWallDepthBelowSlab(double wallDepthBelowSlab); | ||
| 181 | |||
| 182 | void resetWallDepthBelowSlab(); | ||
| 183 | |||
| 184 | bool setFootingWallConstruction(const ConstructionBase& construction); | ||
| 185 | |||
| 186 | void resetFootingWallConstruction(); | ||
| 187 | |||
| 188 | bool setFootingMaterial(const Material& material); | ||
| 189 | |||
| 190 | void resetFootingMaterial(); | ||
| 191 | |||
| 192 | bool setFootingDepth(double footingDepth); | ||
| 193 | |||
| 194 | void resetFootingDepth(); | ||
| 195 | |||
| 196 | //@} | ||
| 197 | /** @name Other */ | ||
| 198 | //@{ | ||
| 199 | |||
| 200 | //@} | ||
| 201 | protected: | ||
| 202 | /// @cond | ||
| 203 | using ImplType = detail::FoundationKiva_Impl; | ||
| 204 | |||
| 205 | friend class Model; | ||
| 206 | friend class openstudio::IdfObject; | ||
| 207 | friend class detail::FoundationKiva_Impl; | ||
| 208 | |||
| 209 | explicit FoundationKiva(std::shared_ptr<detail::FoundationKiva_Impl> impl); | ||
| 210 | |||
| 211 | /// @endcond | ||
| 212 | private: | ||
| 213 | REGISTER_LOGGER("openstudio.model.FoundationKiva"); | ||
| 214 | }; | ||
| 215 | |||
| 216 | /** \relates FoundationKiva*/ | ||
| 217 | using OptionalFoundationKiva = boost::optional<FoundationKiva>; | ||
| 218 | |||
| 219 | /** \relates FoundationKiva*/ | ||
| 220 | using FoundationKivaVector = std::vector<FoundationKiva>; | ||
| 221 | |||
| 222 | } // namespace model | ||
| 223 | } // namespace openstudio | ||
| 224 | |||
| 225 | #endif // MODEL_FOUNDATIONKIVA_HPP | ||
| 226 |