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/DistrictHeatingWater.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_DISTRICTHEATINGWATER_HPP
7 #define MODEL_DISTRICTHEATINGWATER_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Schedule;
17
18 namespace detail {
19
20 class DistrictHeatingWater_Impl;
21
22 } // namespace detail
23
24 /** DistrictHeatingWater is a StraightComponent that wraps the OpenStudio IDD object 'OS:DistrictHeating:Water'. */
25
26 class MODEL_API DistrictHeatingWater : public StraightComponent
27 {
28
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32
33 // The capacityFractionSchedule is defaulted to alwaysOnContinuousSchedule
34 explicit DistrictHeatingWater(const Model& model);
35
36 9 virtual ~DistrictHeatingWater() override = default;
37 // Default the copy and move operators because the virtual dtor is explicit
38 ✗ DistrictHeatingWater(const DistrictHeatingWater& other) = default;
39 ✗ DistrictHeatingWater(DistrictHeatingWater&& other) = default;
40 ✗ DistrictHeatingWater& operator=(const DistrictHeatingWater&) = default;
41 ✗ DistrictHeatingWater& operator=(DistrictHeatingWater&&) = default;
42
43 //@}
44
45 //@}
46 /** @name Static Methods */
47 //@{
48
49 static IddObjectType iddObjectType();
50
51 //@}
52 /** @name Getters */
53 //@{
54
55 boost::optional<double> nominalCapacity() const;
56
57 bool isNominalCapacityAutosized() const;
58
59 Schedule capacityFractionSchedule() const;
60
61 //@}
62 /** @name Setters */
63 //@{
64
65 bool setNominalCapacity(double nominalCapacity);
66
67 void autosizeNominalCapacity();
68
69 bool setCapacityFractionSchedule(Schedule& schedule);
70
71 //@}
72 /** @name Other */
73 //@{
74
75 //@}
76
77 boost::optional<double> autosizedNominalCapacity() const;
78
79 protected:
80 /// @cond
81 using ImplType = detail::DistrictHeatingWater_Impl;
82
83 explicit DistrictHeatingWater(std::shared_ptr<detail::DistrictHeatingWater_Impl> impl);
84
85 friend class detail::DistrictHeatingWater_Impl;
86 friend class Model;
87 friend class IdfObject;
88 friend class openstudio::detail::IdfObject_Impl;
89
90 /// @endcond
91
92 private:
93 REGISTER_LOGGER("openstudio.model.DistrictHeatingWater");
94 };
95
96 /** \relates DistrictHeatingWater*/
97 using OptionalDistrictHeatingWater = boost::optional<DistrictHeatingWater>;
98
99 /** \relates DistrictHeatingWater*/
100 using DistrictHeatingWaterVector = std::vector<DistrictHeatingWater>;
101
102 // In E+ 23.2.0, DistrictHeating was renamed to DistrictHeating:Water. We typedef for backwards compatibility
103 using DistrictHeating [[deprecated("Deprecated at 3.7.0, replaced with DistrictHeatingWater. It will be removed after three releases")]] =
104 DistrictHeatingWater;
105
106 } // namespace model
107 } // namespace openstudio
108
109 #endif // MODEL_DISTRICTHEATINGWATER_HPP
110