GCC Code Coverage Report


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

src/model/PortList_Impl.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_PORTLIST_IMPL_HPP
7 #define MODEL_PORTLIST_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject_Impl.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Node;
17
18 class ThermalZone;
19
20 class HVACComponent;
21
22 namespace detail {
23
24 /** PortList_Impl is a ModelObject_Impl that is the implementation class for PortList.*/
25 class MODEL_API PortList_Impl : public ModelObject_Impl
26 {
27 public:
28 PortList_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
29
30 PortList_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
31
32 PortList_Impl(const PortList_Impl& other, Model_Impl* model, bool keepHandle);
33
34 17044 virtual ~PortList_Impl() override = default;
35
36 unsigned port(unsigned portIndex) const;
37
38 unsigned portIndex(unsigned port) const;
39
40 unsigned nextPort() const;
41
42 boost::optional<ModelObject> modelObject(unsigned portIndex) const;
43
44 boost::optional<ModelObject> lastModelObject();
45
46 std::vector<ModelObject> modelObjects() const;
47
48 unsigned newPortAfterIndex(unsigned portIndex);
49
50 unsigned portIndexForModelObject(ModelObject& modelObject, bool* ok = nullptr) const;
51
52 unsigned nextPortIndex() const;
53
54 void removePort(unsigned port);
55
56 virtual const std::vector<std::string>& outputVariableNames() const override;
57
58 virtual IddObjectType iddObjectType() const override;
59
60 ThermalZone thermalZone() const;
61
62 std::vector<openstudio::IdfObject> remove() override;
63
64 unsigned airLoopHVACPort() const;
65
66 std::vector<unsigned> airLoopHVACPorts() const;
67
68 unsigned airLoopHVACPortIndex() const;
69
70 std::vector<unsigned> airLoopHVACPortIndexes() const;
71
72 boost::optional<ModelObject> airLoopHVACModelObject() const;
73
74 std::vector<ModelObject> airLoopHVACModelObjects() const;
75
76 // Return the HVACComponent that the port list is associated with.
77 HVACComponent hvacComponent() const;
78
79 // Set the hvacComponent that the port list is associated with.
80 bool setHVACComponent(const HVACComponent& hvacComponent);
81
82 protected:
83 private:
84 REGISTER_LOGGER("openstudio.model.PortList");
85 };
86
87 } // namespace detail
88
89 } // namespace model
90 } // namespace openstudio
91
92 #endif // MODEL_PORTLIST_IMPL_HPP
93