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/DistrictCooling.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_DISTRICTCOOLING_HPP
7 #define MODEL_DISTRICTCOOLING_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 DistrictCooling_Impl;
21
22 } // namespace detail
23
24 /** DistrictCooling is a StraightComponent that wraps the OpenStudio IDD object 'OS:DistrictCooling'. */
25
26 class MODEL_API DistrictCooling : public StraightComponent
27 {
28
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32
33 // The capacityFractionSchedule is defaulted to alwaysOnContinuousSchedule
34 explicit DistrictCooling(const Model& model);
35
36 10 virtual ~DistrictCooling() override = default;
37 // Default the copy and move operators because the virtual dtor is explicit
38 ✗ DistrictCooling(const DistrictCooling& other) = default;
39 ✗ DistrictCooling(DistrictCooling&& other) = default;
40 ✗ DistrictCooling& operator=(const DistrictCooling&) = default;
41 ✗ DistrictCooling& operator=(DistrictCooling&&) = 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::DistrictCooling_Impl;
82
83 explicit DistrictCooling(std::shared_ptr<detail::DistrictCooling_Impl> impl);
84
85 friend class detail::DistrictCooling_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.DistrictCooling");
94 };
95
96 /** \relates DistrictCooling*/
97 using OptionalDistrictCooling = boost::optional<DistrictCooling>;
98
99 /** \relates DistrictCooling*/
100 using DistrictCoolingVector = std::vector<DistrictCooling>;
101
102 } // namespace model
103 } // namespace openstudio
104
105 #endif // MODEL_DISTRICTCOOLING_HPP
106