GCC Code Coverage Report


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

src/model/Shade.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_SHADE_HPP
7 #define MODEL_SHADE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ShadingMaterial.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 namespace detail {
17
18 class Shade_Impl;
19
20 } // namespace detail
21
22 /** Shade is a ShadingMaterial that wraps the OpenStudio IDD object 'OS:WindowMaterial:Shade'. */
23 class MODEL_API Shade : public ShadingMaterial
24 {
25 public:
26 /** @name Constructors and Destructors */
27 //@{
28
29 explicit Shade(const Model& model, double solarTransmittance = 0.4, double solarReflectance = 0.5, double visibleTransmittance = 0.4,
30 double visibleReflectance = 0.5, double thermalHemisphericalEmissivity = 0.9, double thermalTransmittance = 0.0,
31 double thickness = 0.005, double conductivity = 0.1);
32
33 6 virtual ~Shade() override = default;
34 // Default the copy and move operators because the virtual dtor is explicit
35 ✗ Shade(const Shade& other) = default;
36 2 Shade(Shade&& other) = default;
37 1 Shade& operator=(const Shade&) = default;
38 ✗ Shade& operator=(Shade&&) = default;
39
40 //@}
41
42 static IddObjectType iddObjectType();
43
44 /** @name Getters */
45 //@{
46
47 /** The conductivity of the material in W/m*K. */
48 double thermalConductivity() const;
49
50 /** The conductance of the material in W/m^2*K. */
51 double thermalConductance() const;
52
53 /** The resistivity of the material in m*K/W. */
54 double thermalResistivity() const;
55
56 /** The resistance of the material in m^2*K/W. */
57 double thermalResistance() const;
58
59 double solarTransmittance() const;
60
61 double solarReflectance() const;
62
63 double visibleTransmittance() const;
64
65 double visibleReflectance() const;
66
67 double thermalHemisphericalEmissivity() const;
68
69 double thermalTransmittance() const;
70
71 double solarAbsorptance() const;
72
73 double visibleAbsorptance() const;
74
75 double thickness() const;
76
77 double conductivity() const;
78
79 double shadetoGlassDistance() const;
80
81 bool isShadetoGlassDistanceDefaulted() const;
82
83 double topOpeningMultiplier() const;
84
85 bool isTopOpeningMultiplierDefaulted() const;
86
87 double bottomOpeningMultiplier() const;
88
89 bool isBottomOpeningMultiplierDefaulted() const;
90
91 double leftSideOpeningMultiplier() const;
92
93 bool isLeftSideOpeningMultiplierDefaulted() const;
94
95 double rightSideOpeningMultiplier() const;
96
97 bool isRightSideOpeningMultiplierDefaulted() const;
98
99 double airflowPermeability() const;
100
101 bool isAirflowPermeabilityDefaulted() const;
102
103 //@}
104 /** @name Setters */
105 //@{
106
107 /** Sets the conductivity of the material in W/m*K, if possible. */
108 bool setThermalConductivity(double value);
109
110 /** Sets the conductance of the material in W/m^2*K, if possible. Sets thickness to achieve conductivity. */
111 bool setThermalConductance(double value);
112
113 /** Sets the resistivity of the material in m*K/W, if possible. */
114 bool setThermalResistivity(double value);
115
116 /** Sets the resistance of the material in m^2*K/W, if possible. Sets thickness to achieve resistivity. */
117 bool setThermalResistance(double value);
118
119 bool setThermalTransmittance(double thermalTransmittance);
120
121 bool setSolarTransmittance(double solarTransmittance);
122
123 bool setSolarReflectance(double solarReflectance);
124
125 bool setVisibleTransmittance(double visibleTransmittance);
126
127 bool setVisibleReflectance(double visibleReflectance);
128
129 bool setThermalHemisphericalEmissivity(double thermalHemisphericalEmissivity);
130
131 bool setThickness(double thickness);
132
133 bool setConductivity(double conductivity);
134
135 bool setShadetoGlassDistance(double shadetoGlassDistance);
136
137 void resetShadetoGlassDistance();
138
139 bool setTopOpeningMultiplier(double topOpeningMultiplier);
140
141 void resetTopOpeningMultiplier();
142
143 bool setBottomOpeningMultiplier(double bottomOpeningMultiplier);
144
145 void resetBottomOpeningMultiplier();
146
147 bool setLeftSideOpeningMultiplier(double leftSideOpeningMultiplier);
148
149 void resetLeftSideOpeningMultiplier();
150
151 bool setRightSideOpeningMultiplier(double rightSideOpeningMultiplier);
152
153 void resetRightSideOpeningMultiplier();
154
155 bool setAirflowPermeability(double airflowPermeability);
156
157 void resetAirflowPermeability();
158
159 //@}
160 /** @name Other */
161 //@{
162
163 //@}
164 protected:
165 /// @cond
166 using ImplType = detail::Shade_Impl;
167
168 explicit Shade(std::shared_ptr<detail::Shade_Impl> impl);
169
170 friend class detail::Shade_Impl;
171 friend class Model;
172 friend class IdfObject;
173 friend class openstudio::detail::IdfObject_Impl;
174 /// @endcond
175 private:
176 REGISTER_LOGGER("openstudio.model.Shade");
177 };
178
179 /** \relates Shade*/
180 using OptionalShade = boost::optional<Shade>;
181
182 /** \relates Shade*/
183 using ShadeVector = std::vector<Shade>;
184
185 } // namespace model
186 } // namespace openstudio
187
188 #endif // MODEL_SHADE_HPP
189