GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 60.0% 3 / 1 / 6
Functions: 60.0% 3 / 1 / 6
Branches: -% 0 / 1 / 1

src/model/RoofVegetation.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_ROOFVEGETATION_HPP
7 #define MODEL_ROOFVEGETATION_HPP
8
9 #include "ModelAPI.hpp"
10 #include "OpaqueMaterial.hpp"
11 #include "../utilities/core/Deprecated.hpp"
12
13 namespace openstudio {
14
15 namespace model {
16
17 namespace detail {
18
19 class RoofVegetation_Impl;
20
21 } // namespace detail
22
23 /** RoofVegetation is a OpaqueMaterial that wraps the OpenStudio IDD object 'OS:Material:RoofVegetation'. */
24 class MODEL_API RoofVegetation : public OpaqueMaterial
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 explicit RoofVegetation(const Model& model, const std::string& roughness = "Smooth");
31
32 7 virtual ~RoofVegetation() override = default;
33 // Default the copy and move operators because the virtual dtor is explicit
34 ✗ RoofVegetation(const RoofVegetation& other) = default;
35 2 RoofVegetation(RoofVegetation&& other) = default;
36 1 RoofVegetation& operator=(const RoofVegetation&) = default;
37 ✗ RoofVegetation& operator=(RoofVegetation&&) = default;
38
39 //@}
40
41 static IddObjectType iddObjectType();
42
43 static std::vector<std::string> roughnessValues();
44
45 static std::vector<std::string> moistureDiffusionCalculationMethodValues();
46
47 /** @name Getters */
48 //@{
49
50 double heightofPlants() const;
51
52 bool isHeightofPlantsDefaulted() const;
53
54 double leafAreaIndex() const;
55
56 bool isLeafAreaIndexDefaulted() const;
57
58 double leafReflectivity() const;
59
60 bool isLeafReflectivityDefaulted() const;
61
62 double leafEmissivity() const;
63
64 bool isLeafEmissivityDefaulted() const;
65
66 double minimumStomatalResistance() const;
67
68 bool isMinimumStomatalResistanceDefaulted() const;
69
70 std::string soilLayerName() const;
71
72 bool isSoilLayerNameDefaulted() const;
73
74 std::string roughness() const;
75
76 /** Density of dry soil (kg/m^3). */
77 double density() const;
78
79 /** Specific heat of dry soil (J/kg*K). */
80 double specificHeat() const;
81
82 /** Maximum moisture content of the soil layer by volume fraction. */
83 double saturationVolumetricMoistureContent() const;
84
85 double residualVolumetricMoistureContent() const;
86
87 double initialVolumetricMoistureContent() const;
88
89 bool isRoughnessDefaulted() const;
90
91 double thickness() const;
92
93 bool isThicknessDefaulted() const;
94
95 double conductivityofDrySoil() const;
96
97 bool isConductivityofDrySoilDefaulted() const;
98
99 double densityofDrySoil() const;
100
101 bool isDensityofDrySoilDefaulted() const;
102
103 double specificHeatofDrySoil() const;
104
105 bool isSpecificHeatofDrySoilDefaulted() const;
106
107 boost::optional<double> thermalAbsorptance() const;
108
109 bool isThermalAbsorptanceDefaulted() const;
110
111 boost::optional<double> solarAbsorptance() const;
112
113 bool isSolarAbsorptanceDefaulted() const;
114
115 boost::optional<double> visibleAbsorptance() const;
116
117 bool isVisibleAbsorptanceDefaulted() const;
118
119 double saturationVolumetricMoistureContentoftheSoilLayer() const;
120
121 bool isSaturationVolumetricMoistureContentoftheSoilLayerDefaulted() const;
122
123 double residualVolumetricMoistureContentoftheSoilLayer() const;
124
125 bool isResidualVolumetricMoistureContentoftheSoilLayerDefaulted() const;
126
127 double initialVolumetricMoistureContentoftheSoilLayer() const;
128
129 bool isInitialVolumetricMoistureContentoftheSoilLayerDefaulted() const;
130
131 std::string moistureDiffusionCalculationMethod() const;
132
133 bool isMoistureDiffusionCalculationMethodDefaulted() const;
134
135 //@}
136 /** @name Setters */
137 //@{
138
139 bool setLeafAreaIndex(double leafAreaIndex);
140
141 bool setLeafReflectivity(double leafReflectivity);
142
143 bool setLeafEmissivity(double leafEmissivity);
144
145 bool setMinimumStomatalResistance(double value);
146
147 bool setSoilLayerName(const std::string& name);
148
149 bool setRoughness(const std::string& value);
150
151 /** Set density of dry soil (kg/m^3). */
152 bool setDensity(double value);
153
154 /** Set specific heat of dry soil (J/kg*K). */
155 bool setSpecificHeat(double value);
156
157 /** Set the maximum moisture content of the soil layer by volume fraction. */
158 bool setSaturationVolumetricMoistureContent(double value);
159
160 bool setResidualVolumetricMoistureContent(double value);
161
162 OS_DEPRECATED(3, 11, 0) bool setInitialVolumetricMoistureConent(double value);
163 bool setInitialVolumetricMoistureContent(double value);
164
165 bool setMoistureDiffusionCalculationMethod(const std::string& value);
166
167 bool setHeightofPlants(double heightofPlants);
168
169 void resetHeightofPlants();
170
171 void resetLeafAreaIndex();
172
173 void resetLeafReflectivity();
174
175 void resetLeafEmissivity();
176
177 void resetMinimumStomatalResistance();
178
179 void resetSoilLayerName();
180
181 void resetRoughness();
182
183 bool setThickness(double thickness);
184
185 void resetThickness();
186
187 bool setConductivityofDrySoil(double conductivityofDrySoil);
188
189 void resetConductivityofDrySoil();
190
191 bool setDensityofDrySoil(double densityofDrySoil);
192
193 void resetDensityofDrySoil();
194
195 bool setSpecificHeatofDrySoil(double specificHeatofDrySoil);
196
197 void resetSpecificHeatofDrySoil();
198
199 bool setThermalAbsorptance(double thermalAbsorptance);
200
201 void resetThermalAbsorptance();
202
203 bool setSolarAbsorptance(double solarAbsorptance);
204
205 void resetSolarAbsorptance();
206
207 bool setVisibleAbsorptance(double visibleAbsorptance);
208
209 void resetVisibleAbsorptance();
210
211 bool setSaturationVolumetricMoistureContentoftheSoilLayer(double saturationVolumetricMoistureContentoftheSoilLayer);
212
213 void resetSaturationVolumetricMoistureContentoftheSoilLayer();
214
215 bool setResidualVolumetricMoistureContentoftheSoilLayer(double residualVolumetricMoistureContentoftheSoilLayer);
216
217 void resetResidualVolumetricMoistureContentoftheSoilLayer();
218
219 bool setInitialVolumetricMoistureContentoftheSoilLayer(double initialVolumetricMoistureContentoftheSoilLayer);
220
221 void resetInitialVolumetricMoistureContentoftheSoilLayer();
222
223 void resetMoistureDiffusionCalculationMethod();
224
225 //@}
226 /** @name Other */
227 //@{
228
229 //@}
230 protected:
231 /// @cond
232 using ImplType = detail::RoofVegetation_Impl;
233
234 explicit RoofVegetation(std::shared_ptr<detail::RoofVegetation_Impl> impl);
235
236 friend class detail::RoofVegetation_Impl;
237 friend class Model;
238 friend class IdfObject;
239 friend class openstudio::detail::IdfObject_Impl;
240 /// @endcond
241 private:
242 − REGISTER_LOGGER("openstudio.model.RoofVegetation");
243 };
244
245 /** \relates RoofVegetation*/
246 using OptionalRoofVegetation = boost::optional<RoofVegetation>;
247
248 /** \relates RoofVegetation*/
249 using RoofVegetationVector = std::vector<RoofVegetation>;
250
251 } // namespace model
252 } // namespace openstudio
253
254 #endif // MODEL_ROOFVEGETATION_HPP
255