GCC Code Coverage Report


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

src/model/WaterUseConnections.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_WATERUSECONNECTIONS_HPP
7 #define MODEL_WATERUSECONNECTIONS_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Schedule;
17 class WaterUseEquipment;
18
19 namespace detail {
20
21 class WaterUseConnections_Impl;
22
23 } // namespace detail
24
25 /** WaterUseConnections is a StraightComponent that wraps the OpenStudio IDD object
26 * 'OS:WaterUse:Connections'. */
27 class MODEL_API WaterUseConnections : public StraightComponent
28 {
29
30 public:
31 explicit WaterUseConnections(const Model& model);
32
33 67 virtual ~WaterUseConnections() override = default;
34 // Default the copy and move operators because the virtual dtor is explicit
35 ✗ WaterUseConnections(const WaterUseConnections& other) = default;
36 ✗ WaterUseConnections(WaterUseConnections&& other) = default;
37 ✗ WaterUseConnections& operator=(const WaterUseConnections&) = default;
38 ✗ WaterUseConnections& operator=(WaterUseConnections&&) = default;
39
40 static IddObjectType iddObjectType();
41
42 boost::optional<Schedule> hotWaterSupplyTemperatureSchedule() const;
43
44 bool setHotWaterSupplyTemperatureSchedule(Schedule& hotWaterSupplyTemperatureSchedule);
45
46 void resetHotWaterSupplyTemperatureSchedule();
47
48 boost::optional<Schedule> coldWaterSupplyTemperatureSchedule() const;
49
50 bool setColdWaterSupplyTemperatureSchedule(Schedule& coldWaterSupplyTemperatureSchedule);
51
52 void resetColdWaterSupplyTemperatureSchedule();
53
54 std::vector<WaterUseEquipment> waterUseEquipment() const;
55
56 bool addWaterUseEquipment(const WaterUseEquipment& waterUseEquipment);
57
58 // Detaches waterUseEquipment from this object but does not remove it from the model
59 bool removeWaterUseEquipment(WaterUseEquipment& waterUseEquipment);
60
61 unsigned inletPort() const;
62
63 unsigned outletPort() const;
64
65 std::string drainWaterHeatExchangerType() const;
66
67 bool setDrainWaterHeatExchangerType(const std::string& drainWaterHeatExchangerType);
68
69 std::string drainWaterHeatExchangerDestination() const;
70
71 bool setDrainWaterHeatExchangerDestination(const std::string& drainWaterHeatExchangerDestination);
72
73 boost::optional<double> drainWaterHeatExchangerUFactorTimesArea() const;
74
75 bool setDrainWaterHeatExchangerUFactorTimesArea(double drainWaterHeatExchangerUFactorTimesArea);
76
77 void resetDrainWaterHeatExchangerUFactorTimesArea();
78
79 protected:
80 /// @cond
81 using ImplType = detail::WaterUseConnections_Impl;
82
83 explicit WaterUseConnections(std::shared_ptr<detail::WaterUseConnections_Impl> impl);
84
85 friend class detail::WaterUseConnections_Impl;
86 friend class Model;
87 friend class IdfObject;
88 friend class openstudio::detail::IdfObject_Impl;
89 /// @endcond
90
91 private:
92 REGISTER_LOGGER("openstudio.model.WaterUseConnections");
93 };
94
95 /** \relates WaterUseConnections*/
96 using OptionalWaterUseConnections = boost::optional<WaterUseConnections>;
97
98 /** \relates WaterUseConnections*/
99 using WaterUseConnectionsVector = std::vector<WaterUseConnections>;
100
101 } // namespace model
102 } // namespace openstudio
103
104 #endif // MODEL_WATERUSECONNECTIONS_HPP
105