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/AirflowNetworkExternalNode.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_AIRFLOWNETWORKEXTERNALNODE_HPP
7 #define MODEL_AIRFLOWNETWORKEXTERNALNODE_HPP
8
9 #include "ModelAPI.hpp"
10
11 #include "AirflowNetworkNode.hpp"
12
13 namespace openstudio {
14
15 namespace model {
16
17 class Curve;
18
19 namespace detail {
20
21 class AirflowNetworkExternalNode_Impl;
22
23 } // namespace detail
24
25 /** AirflowNetworkExternalNode is a ModelObject that wraps the OpenStudio IDD object 'OS:AirflowNetworkExternalNode'. */
26 class MODEL_API AirflowNetworkExternalNode : public AirflowNetworkNode
27 {
28 public:
29 /** @name Constructors and Destructors */
30 //@{
31 /** Construct an external node with defaulted values. */
32 explicit AirflowNetworkExternalNode(const Model& model);
33 /** Construct an external node with a specified wind pressure curve. */
34 explicit AirflowNetworkExternalNode(const Model& model, const Curve& curve);
35
36 10 virtual ~AirflowNetworkExternalNode() override = default;
37 // Default the copy and move operators because the virtual dtor is explicit
38 ✗ AirflowNetworkExternalNode(const AirflowNetworkExternalNode& other) = default;
39 4 AirflowNetworkExternalNode(AirflowNetworkExternalNode&& other) = default;
40 ✗ AirflowNetworkExternalNode& operator=(const AirflowNetworkExternalNode&) = default;
41 ✗ AirflowNetworkExternalNode& operator=(AirflowNetworkExternalNode&&) = default;
42
43 //@}
44
45 static IddObjectType iddObjectType();
46
47 static std::vector<std::string> windAngleTypeValues();
48
49 /** @name Getters */
50 //@{
51 /** Returns the external node height. */
52 double externalNodeHeight() const;
53 /** Returns true if the external node height is defaulted. */
54 bool isExternalNodeHeightDefaulted() const;
55 /** Returns the wind pressure coefficient curve for this external node. */
56 Curve windPressureCoefficientCurve() const;
57 /** Returns true if the wind pressure curve is to be treated as symmetric. */
58 bool symmetricWindPressureCoefficientCurve() const;
59 /** Returns true if the wind pressure curve symmetry is defaulted. */
60 bool isSymmetricWindPressureCoefficientCurveDefaulted() const;
61 /** Returns the wind angle type, "Absolute" or "Relative". */
62 std::string windAngleType() const;
63 /** Returns true if the wind angle type is defaulted ("Absolute). */
64 bool isWindAngleTypeDefaulted() const;
65
66 //@}
67 /** @name Setters */
68 //@{
69 /** Sets the external node height. */
70 void setExternalNodeHeight(double externalNodeHeight);
71 /** Resets the external node height. */
72 void resetExternalNodeHeight();
73
74 /** Sets the wind pressure coefficient curve. */
75 bool setWindPressureCoefficientCurve(const Curve& wPCValue);
76 /** Sets the wind pressure curve symmetry. */
77 void setSymmetricWindPressureCoefficientCurve(bool symmetricWindPressureCoefficientCurve);
78 /** Resets the wind pressure curve symmetry. */
79 void resetSymmetricWindPressureCoefficientCurve();
80 /** Sets the wind angle type. */
81 bool setWindAngleType(const std::string& windAngleType);
82 /** Resets the wind angle type. */
83 void resetWindAngleType();
84
85 //@}
86 /** @name Other */
87 //@{
88
89 //@}
90 protected:
91 /// @cond
92 using ImplType = detail::AirflowNetworkExternalNode_Impl;
93
94 explicit AirflowNetworkExternalNode(std::shared_ptr<detail::AirflowNetworkExternalNode_Impl> impl);
95
96 friend class detail::AirflowNetworkExternalNode_Impl;
97 friend class Model;
98 friend class IdfObject;
99 friend class openstudio::detail::IdfObject_Impl;
100 /// @endcond
101 private:
102 REGISTER_LOGGER("openstudio.model.AirflowNetworkExternalNode");
103 };
104
105 /** \relates AirflowNetworkExternalNode*/
106 using OptionalAirflowNetworkExternalNode = boost::optional<AirflowNetworkExternalNode>;
107
108 /** \relates AirflowNetworkExternalNode*/
109 using AirflowNetworkExternalNodeVector = std::vector<AirflowNetworkExternalNode>;
110
111 } // namespace model
112 } // namespace openstudio
113
114 #endif // MODEL_AIRFLOWNETWORKEXTERNALNODE_HPP
115