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/AirflowNetworkSpecifiedFlowRate.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_AIRFLOWNETWORKSpecifiedFlowRate_HPP
7 #define MODEL_AIRFLOWNETWORKSpecifiedFlowRate_HPP
8
9 #include "ModelAPI.hpp"
10
11 #include "AirflowNetworkComponent.hpp"
12
13 namespace openstudio {
14
15 namespace model {
16
17 namespace detail {
18
19 class AirflowNetworkSpecifiedFlowRate_Impl;
20
21 } // namespace detail
22
23 /** AirflowNetworkSpecifiedFlowRate is a ModelObject that wraps the OpenStudio IDD object 'OS:AirflowNetworkSpecifiedFlowRate'. */
24 class MODEL_API AirflowNetworkSpecifiedFlowRate : public AirflowNetworkComponent
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29 /** Construct a specified flow rate object with a zero airflow value. */
30 AirflowNetworkSpecifiedFlowRate(const Model& model);
31 /** Construct a specified flow rate object with a specified airflow value. */
32 AirflowNetworkSpecifiedFlowRate(const Model& model, double airFlowValue);
33
34 6 virtual ~AirflowNetworkSpecifiedFlowRate() override = default;
35 // Default the copy and move operators because the virtual dtor is explicit
36 ✗ AirflowNetworkSpecifiedFlowRate(const AirflowNetworkSpecifiedFlowRate& other) = default;
37 1 AirflowNetworkSpecifiedFlowRate(AirflowNetworkSpecifiedFlowRate&& other) = default;
38 ✗ AirflowNetworkSpecifiedFlowRate& operator=(const AirflowNetworkSpecifiedFlowRate&) = default;
39 ✗ AirflowNetworkSpecifiedFlowRate& operator=(AirflowNetworkSpecifiedFlowRate&&) = default;
40
41 //@}
42
43 static IddObjectType iddObjectType();
44
45 static std::vector<std::string> airFlowUnitsValues();
46
47 static std::vector<std::string> validAirFlowUnitsValues();
48
49 /** @name Getters */
50 //@{
51 /** Returns the air flow value. */
52 double airFlowValue() const;
53 /** Returns the air flow units. */
54 std::string airFlowUnits() const;
55 /** Returns true if the air flow units is defaulted. */
56 bool isAirFlowUnitsDefaulted() const;
57
58 //@}
59 /** @name Setters */
60 //@{
61 /** Sets the air flow value. */
62 bool setAirFlowValue(double airFlowValue);
63 /** Sets the air flow units. */
64 bool setAirFlowUnits(const std::string& airFlowUnits);
65 /** Returns the air flow units to the default value. */
66 void resetAirFlowUnits();
67
68 //@}
69 protected:
70 /// @cond
71 using ImplType = detail::AirflowNetworkSpecifiedFlowRate_Impl;
72
73 explicit AirflowNetworkSpecifiedFlowRate(std::shared_ptr<detail::AirflowNetworkSpecifiedFlowRate_Impl> impl);
74
75 friend class detail::AirflowNetworkSpecifiedFlowRate_Impl;
76 friend class Model;
77 friend class IdfObject;
78 friend class openstudio::detail::IdfObject_Impl;
79 /// @endcond
80 private:
81 REGISTER_LOGGER("openstudio.model.AirflowNetworkSpecifiedFlowRate");
82 };
83
84 /** \relates AirflowNetworkSpecifiedFlowRate*/
85 using OptionalAirflowNetworkSpecifiedFlowRate = boost::optional<AirflowNetworkSpecifiedFlowRate>;
86
87 /** \relates AirflowNetworkSpecifiedFlowRate*/
88 using AirflowNetworkSpecifiedFlowRateVector = std::vector<AirflowNetworkSpecifiedFlowRate>;
89
90 } // namespace model
91 } // namespace openstudio
92
93 #endif // MODEL_AIRFLOWNETWORKSpecifiedFlowRate_HPP
94