GCC Code Coverage Report


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

src/model/SurfacePropertyConvectionCoefficients.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_SURFACEPROPERTYCONVECTIONCOEFFICIENTS_HPP
7 #define MODEL_SURFACEPROPERTYCONVECTIONCOEFFICIENTS_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11 #include "Surface.hpp"
12 #include "SubSurface.hpp"
13 #include "InternalMass.hpp"
14
15 namespace openstudio {
16
17 namespace model {
18
19 class Schedule;
20
21 namespace detail {
22
23 class SurfacePropertyConvectionCoefficients_Impl;
24
25 } // namespace detail
26
27 /** SurfacePropertyConvectionCoefficients is a ModelObject that wraps the OpenStudio IDD object 'OS:SurfaceProperty:ConvectionCoefficients'. */
28 class MODEL_API SurfacePropertyConvectionCoefficients : public ModelObject
29 {
30 public:
31 /** @name Constructors and Destructors */
32 //@{
33
34 explicit SurfacePropertyConvectionCoefficients(const Surface& surface);
35
36 explicit SurfacePropertyConvectionCoefficients(const SubSurface& surface);
37
38 explicit SurfacePropertyConvectionCoefficients(const InternalMass& surface);
39
40 121 virtual ~SurfacePropertyConvectionCoefficients() override = default;
41 // Default the copy and move operators because the virtual dtor is explicit
42 22 SurfacePropertyConvectionCoefficients(const SurfacePropertyConvectionCoefficients& other) = default;
43 43 SurfacePropertyConvectionCoefficients(SurfacePropertyConvectionCoefficients&& other) = default;
44 ✗ SurfacePropertyConvectionCoefficients& operator=(const SurfacePropertyConvectionCoefficients&) = default;
45 1 SurfacePropertyConvectionCoefficients& operator=(SurfacePropertyConvectionCoefficients&&) = default;
46
47 //@}
48
49 static IddObjectType iddObjectType();
50
51 static std::vector<std::string> convectionCoefficient1LocationValues();
52
53 static std::vector<std::string> convectionCoefficient1TypeValues();
54
55 static std::vector<std::string> convectionCoefficient2LocationValues();
56
57 static std::vector<std::string> convectionCoefficient2TypeValues();
58
59 /** @name Getters */
60 //@{
61
62 ModelObject surfaceAsModelObject() const;
63
64 boost::optional<Surface> surfaceAsSurface() const;
65
66 boost::optional<SubSurface> surfaceAsSubSurface() const;
67
68 boost::optional<InternalMass> surfaceAsInternalMass() const;
69
70 boost::optional<std::string> convectionCoefficient1Location() const;
71
72 boost::optional<std::string> convectionCoefficient1Type() const;
73
74 boost::optional<double> convectionCoefficient1() const;
75
76 boost::optional<Schedule> convectionCoefficient1Schedule() const;
77
78 boost::optional<std::string> convectionCoefficient2Location() const;
79
80 boost::optional<std::string> convectionCoefficient2Type() const;
81
82 boost::optional<double> convectionCoefficient2() const;
83
84 boost::optional<Schedule> convectionCoefficient2Schedule() const;
85
86 //@}
87 /** @name Setters */
88 //@{
89
90 bool setSurface(const ModelObject& surface);
91
92 bool setConvectionCoefficient1Location(const std::string& convectionCoefficient1Location);
93
94 void resetConvectionCoefficient1Location();
95
96 bool setConvectionCoefficient1Type(const std::string& convectionCoefficient1Type);
97
98 void resetConvectionCoefficient1Type();
99
100 bool setConvectionCoefficient1(double convectionCoefficient1);
101
102 void resetConvectionCoefficient1();
103
104 bool setConvectionCoefficient1Schedule(Schedule& schedule);
105
106 void resetConvectionCoefficient1Schedule();
107
108 bool setConvectionCoefficient2Location(const std::string& convectionCoefficient2Location);
109
110 void resetConvectionCoefficient2Location();
111
112 bool setConvectionCoefficient2Type(const std::string& convectionCoefficient2Type);
113
114 void resetConvectionCoefficient2Type();
115
116 bool setConvectionCoefficient2(double convectionCoefficient2);
117
118 void resetConvectionCoefficient2();
119
120 bool setConvectionCoefficient2Schedule(Schedule& schedule);
121
122 void resetConvectionCoefficient2Schedule();
123
124 //@}
125 /** @name Other */
126 //@{
127
128 //@}
129 protected:
130 /// @cond
131 using ImplType = detail::SurfacePropertyConvectionCoefficients_Impl;
132
133 explicit SurfacePropertyConvectionCoefficients(std::shared_ptr<detail::SurfacePropertyConvectionCoefficients_Impl> impl);
134
135 friend class detail::SurfacePropertyConvectionCoefficients_Impl;
136 friend class Model;
137 friend class IdfObject;
138 friend class openstudio::detail::IdfObject_Impl;
139 /// @endcond
140 private:
141 REGISTER_LOGGER("openstudio.model.SurfacePropertyConvectionCoefficients");
142 };
143
144 /** \relates SurfacePropertyConvectionCoefficients*/
145 using OptionalSurfacePropertyConvectionCoefficients = boost::optional<SurfacePropertyConvectionCoefficients>;
146
147 /** \relates SurfacePropertyConvectionCoefficients*/
148 using SurfacePropertyConvectionCoefficientsVector = std::vector<SurfacePropertyConvectionCoefficients>;
149
150 } // namespace model
151 } // namespace openstudio
152
153 #endif // MODEL_SURFACEPROPERTYCONVECTIONCOEFFICIENTS_HPP
154