GCC Code Coverage Report


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

src/model/AirflowNetworkHorizontalOpening.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_AIRFLOWNETWORKHORIZONTALOPENING_HPP
7 #define MODEL_AIRFLOWNETWORKHORIZONTALOPENING_HPP
8
9 #include "ModelAPI.hpp"
10 #include "AirflowNetworkComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 namespace detail {
17
18 class AirflowNetworkHorizontalOpening_Impl;
19
20 } // namespace detail
21
22 /** AirflowNetworkHorizontalOpening is a ModelObject that wraps the OpenStudio IDD object 'OS:AirflowNetworkHorizontalOpening'. */
23 class MODEL_API AirflowNetworkHorizontalOpening : public AirflowNetworkComponent
24 {
25 public:
26 /** @name Constructors and Destructors */
27 //@{
28 /** Construct a horizontal opening object with default mass flow exponent and sloping plane angle. */
29 AirflowNetworkHorizontalOpening(const Model& model, double massFlowCoefficientWhenOpeningisClosed, double dischargeCoefficient);
30 /** Construct a horizontal opening object. */
31 AirflowNetworkHorizontalOpening(const Model& model, double massFlowCoefficientWhenOpeningisClosed, double massFlowExponentWhenOpeningisClosed,
32 double slopingPlaneAngle, double dischargeCoefficient);
33
34 5 virtual ~AirflowNetworkHorizontalOpening() override = default;
35 // Default the copy and move operators because the virtual dtor is explicit
36 ✗ AirflowNetworkHorizontalOpening(const AirflowNetworkHorizontalOpening& other) = default;
37 1 AirflowNetworkHorizontalOpening(AirflowNetworkHorizontalOpening&& other) = default;
38 ✗ AirflowNetworkHorizontalOpening& operator=(const AirflowNetworkHorizontalOpening&) = default;
39 ✗ AirflowNetworkHorizontalOpening& operator=(AirflowNetworkHorizontalOpening&&) = default;
40
41 //@}
42
43 static IddObjectType iddObjectType();
44
45 /** @name Getters */
46 //@{
47 /** Returns the mass flow coefficient when the opening is closed in kg/s-m at 1 Pa pressure difference. */
48 double airMassFlowCoefficientWhenOpeningisClosed() const;
49 /** Returns the mass flow exponent when the opening is closed. */
50 double airMassFlowExponentWhenOpeningisClosed() const;
51 /** Returns true if the mass flow exponent is defaulted. */
52 bool isAirMassFlowExponentWhenOpeningisClosedDefaulted() const;
53 /** Returns the angle of the horizontal opening to a sloping plane beneath it (reducing the effective opening area)
54 in degrees, 90 degrees corresponds to fully open. */
55 double slopingPlaneAngle() const;
56 /** Returns true if the sloping plane angle is defaulted. */
57 bool isSlopingPlaneAngleDefaulted() const;
58 /** Returns the discharge coefficient. */
59 double dischargeCoefficient() const;
60
61 //@}
62 /** @name Setters */
63 //@{
64 /** Sets the mass flow coefficient when the opening is closed in kg/s-m at 1 Pa pressure difference. */
65 bool setAirMassFlowCoefficientWhenOpeningisClosed(double airMassFlowCoefficientWhenOpeningisClosed);
66 /** Sets the mass flow exponent when the opening is closed. */
67 bool setAirMassFlowExponentWhenOpeningisClosed(double airMassFlowExponentWhenOpeningisClosed);
68 /** Resets the mass flow exponent when the opening is closed to the default value. */
69 void resetAirMassFlowExponentWhenOpeningisClosed();
70 /** Sets the angle of the horizontal opening to a sloping plane beneath it (reducing the effective opening area)
71 in degrees, 90 degrees corresponds to fully open. */
72 bool setSlopingPlaneAngle(double slopingPlaneAngle);
73 /** Resets the sloping plane to the default value. */
74 void resetSlopingPlaneAngle();
75 /** Sets the discharge coefficient. */
76 bool setDischargeCoefficient(double dischargeCoefficient);
77
78 //@}
79 protected:
80 /// @cond
81 using ImplType = detail::AirflowNetworkHorizontalOpening_Impl;
82
83 explicit AirflowNetworkHorizontalOpening(std::shared_ptr<detail::AirflowNetworkHorizontalOpening_Impl> impl);
84
85 friend class detail::AirflowNetworkHorizontalOpening_Impl;
86 friend class Model;
87 friend class IdfObject;
88 friend class openstudio::detail::IdfObject_Impl;
89 /// @endcond
90 private:
91 REGISTER_LOGGER("openstudio.model.AirflowNetworkHorizontalOpening");
92 };
93
94 /** \relates AirflowNetworkHorizontalOpening*/
95 using OptionalAirflowNetworkHorizontalOpening = boost::optional<AirflowNetworkHorizontalOpening>;
96
97 /** \relates AirflowNetworkHorizontalOpening*/
98 using AirflowNetworkHorizontalOpeningVector = std::vector<AirflowNetworkHorizontalOpening>;
99
100 } // namespace model
101 } // namespace openstudio
102
103 #endif // MODEL_AIRFLOWNETWORKHORIZONTALOPENING_HPP
104