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/AirflowNetworkCrack.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_AIRFLOWNETWORKCRACK_HPP
7 #define MODEL_AIRFLOWNETWORKCRACK_HPP
8
9 #include "ModelAPI.hpp"
10
11 #include "AirflowNetworkComponent.hpp"
12
13 namespace openstudio {
14
15 namespace model {
16
17 class AirflowNetworkReferenceCrackConditions;
18
19 namespace detail {
20
21 class AirflowNetworkCrack_Impl;
22
23 } // namespace detail
24
25 /** AirflowNetworkCrack is a ModelObject that wraps the OpenStudio IDD object 'OS:AirflowNetworkCrack'. */
26 class MODEL_API AirflowNetworkCrack : public AirflowNetworkComponent
27 {
28 public:
29 /** @name Constructors and Destructors */
30 //@{
31 /** Construct a surface crack object with default values and a specified mass flow coefficient. */
32 AirflowNetworkCrack(const Model& model, double massFlowCoefficient);
33 /** Construct a surface crack object without a reference conditions object. */
34 AirflowNetworkCrack(const Model& model, double massFlowCoefficient, double massFlowExponent);
35 /** Construct a surface crack object. */
36 AirflowNetworkCrack(const Model& model, double massFlowCoefficient, double massFlowExponent,
37 const AirflowNetworkReferenceCrackConditions& referenceCrackConditions);
38
39 21 virtual ~AirflowNetworkCrack() override = default;
40 // Default the copy and move operators because the virtual dtor is explicit
41 ✗ AirflowNetworkCrack(const AirflowNetworkCrack& other) = default;
42 8 AirflowNetworkCrack(AirflowNetworkCrack&& other) = default;
43 ✗ AirflowNetworkCrack& operator=(const AirflowNetworkCrack&) = default;
44 ✗ AirflowNetworkCrack& operator=(AirflowNetworkCrack&&) = default;
45
46 //@}
47
48 static IddObjectType iddObjectType();
49
50 /** @name Getters */
51 //@{
52 /** Returns the mass flow coefficient in kg/s at 1 Pa. */
53 double airMassFlowCoefficient() const;
54 /** Returns the mass flow exponent. */
55 double airMassFlowExponent() const;
56 /** Returns true if the mass flow exponent is defaulted. */
57 bool isAirMassFlowExponentDefaulted() const;
58 /** Returns a reference crack conditions object if available. */
59 boost::optional<AirflowNetworkReferenceCrackConditions> referenceCrackConditions() const;
60
61 //@}
62 /** @name Setters */
63 //@{
64 /** Sets the mass flow coefficient in kg/s at 1 Pa. */
65 bool setAirMassFlowCoefficient(double airMassFlowCoefficientatReferenceConditions);
66 /** Sets the mass flow exponent. */
67 bool setAirMassFlowExponent(double airMassFlowExponent);
68 /** Returns the mass flow exponent to the default value. */
69 void resetAirMassFlowExponent();
70 /** Sets the the reference crack conditions. */
71 bool setReferenceCrackConditions(const AirflowNetworkReferenceCrackConditions& referenceCrackConditions);
72 /** Resets the the reference crack conditions. */
73 void resetReferenceCrackConditions();
74
75 //@}
76 protected:
77 /// @cond
78 using ImplType = detail::AirflowNetworkCrack_Impl;
79
80 explicit AirflowNetworkCrack(std::shared_ptr<detail::AirflowNetworkCrack_Impl> impl);
81
82 friend class detail::AirflowNetworkCrack_Impl;
83 friend class Model;
84 friend class IdfObject;
85 friend class openstudio::detail::IdfObject_Impl;
86 /// @endcond
87 private:
88 REGISTER_LOGGER("openstudio.model.AirflowNetworkCrack");
89 };
90
91 /** \relates AirflowNetworkCrack*/
92 using OptionalAirflowNetworkCrack = boost::optional<AirflowNetworkCrack>;
93
94 /** \relates AirflowNetworkCrack*/
95 using AirflowNetworkCrackVector = std::vector<AirflowNetworkCrack>;
96
97 } // namespace model
98 } // namespace openstudio
99
100 #endif // MODEL_AIRFLOWNETWORKCRACK_HPP
101