GCC Code Coverage Report


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

src/model/AirLoopHVACZoneSplitter.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_AIRLOOPHVACZONESPLITTER_HPP
7 #define MODEL_AIRLOOPHVACZONESPLITTER_HPP
8
9 #include "ModelAPI.hpp"
10 #include "Splitter.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class ThermalZone;
17 class AirflowNetworkDistributionNode;
18
19 namespace detail {
20 class AirLoopHVACZoneSplitter_Impl;
21 } // namespace detail
22
23 /** AirLoopHVACZoneSplitter is an interface to the EnergyPlus IDD object named "AirLoopHVAC:ZoneSplitter"
24 *
25 * The purpose of this class is to simplify the construction and manipulation
26 * of zone splitter objects in EnergyPlus. Methods are built around the
27 * acts of getting the inlet and outlet ports to the splitter. Branch indexes
28 * are used to refer to the many outlet ports of the mixer
29 */
30 class MODEL_API AirLoopHVACZoneSplitter : public Splitter
31 {
32 public:
33 /** Constructs a new AirLoopHVACZoneSplitter object and places it inside the model. */
34 explicit AirLoopHVACZoneSplitter(const Model& model);
35
36 6183 virtual ~AirLoopHVACZoneSplitter() override = default;
37 // Default the copy and move operators because the virtual dtor is explicit
38 1461 AirLoopHVACZoneSplitter(const AirLoopHVACZoneSplitter& other) = default;
39 2469 AirLoopHVACZoneSplitter(AirLoopHVACZoneSplitter&& other) = default;
40 ✗ AirLoopHVACZoneSplitter& operator=(const AirLoopHVACZoneSplitter&) = default;
41 ✗ AirLoopHVACZoneSplitter& operator=(AirLoopHVACZoneSplitter&&) = default;
42
43 /// Returns the IddObjectType.
44 static IddObjectType iddObjectType();
45
46 /** Returns the inlet port to the zone splitter. */
47 unsigned inletPort() const override;
48
49 /** Returns the outlet port for branchIndex. Branches are sequentially
50 * indexed starting from 0.
51 */
52 unsigned outletPort(unsigned branchIndex) const override;
53
54 /** Returns the next available outlet port. This will be the first port
55 * with no connected objects */
56 unsigned nextOutletPort() const override;
57
58 /** Returns a vector of all ZoneHVACEquipmentConnections objects connected
59 * to the splitter's outlets.
60 */
61 std::vector<ThermalZone> thermalZones();
62
63 AirflowNetworkDistributionNode getAirflowNetworkDistributionNode();
64
65 boost::optional<AirflowNetworkDistributionNode> airflowNetworkDistributionNode() const;
66
67 protected:
68 /// @cond
69
70 friend class Model;
71
72 friend class openstudio::IdfObject;
73
74 using ImplType = detail::AirLoopHVACZoneSplitter_Impl;
75
76 explicit AirLoopHVACZoneSplitter(std::shared_ptr<detail::AirLoopHVACZoneSplitter_Impl> impl);
77
78 private:
79 REGISTER_LOGGER("openstudio.model.AirLoopHVACZoneSplitter");
80
81 /// @endcond
82 };
83
84 /** \relates AirLoopHVACZoneSplitter */
85 using OptionalAirLoopHVACZoneSplitter = boost::optional<AirLoopHVACZoneSplitter>;
86
87 /** \relates AirLoopHVACZoneSplitter */
88 using AirLoopHVACZoneSplitterVector = std::vector<AirLoopHVACZoneSplitter>;
89
90 } // namespace model
91 } // namespace openstudio
92
93 #endif // MODEL_AIRLOOPHVACZONESPLITTER_HPP
94