GCC Code Coverage Report


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

src/model/CoilHeatingElectric.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_COILHEATINGELECTRIC_HPP
7 #define MODEL_COILHEATINGELECTRIC_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Schedule;
16 class Node;
17 class AirflowNewtorkEquivalentDuct;
18
19 namespace detail {
20
21 class CoilHeatingElectric_Impl;
22
23 } // namespace detail
24
25 /** CoilHeatingElectric is a StraightComponent that wraps the OpenStudio IDD
26 * object 'OS_Coil_Heating_Electric'. */
27 class MODEL_API CoilHeatingElectric : public StraightComponent
28 {
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32
33 CoilHeatingElectric(const Model& model, Schedule& schedule);
34
35 CoilHeatingElectric(const Model& model);
36
37 307 virtual ~CoilHeatingElectric() override = default;
38 // Default the copy and move operators because the virtual dtor is explicit
39 ✗ CoilHeatingElectric(const CoilHeatingElectric& other) = default;
40 66 CoilHeatingElectric(CoilHeatingElectric&& other) = default;
41 ✗ CoilHeatingElectric& operator=(const CoilHeatingElectric&) = default;
42 ✗ CoilHeatingElectric& operator=(CoilHeatingElectric&&) = default;
43
44 //@}
45
46 static IddObjectType iddObjectType();
47
48 /** @name Getters */
49 //@{
50
51 Schedule availabilitySchedule() const;
52
53 double efficiency() const;
54
55 bool isEfficiencyDefaulted() const;
56
57 boost::optional<double> nominalCapacity() const;
58
59 bool isNominalCapacityDefaulted() const;
60
61 bool isNominalCapacityAutosized() const;
62
63 boost::optional<Node> temperatureSetpointNode() const;
64
65 //@}
66 /** @name Setters */
67 //@{
68
69 bool setAvailabilitySchedule(Schedule& schedule);
70
71 bool setEfficiency(double efficiency);
72
73 void resetEfficiency();
74
75 bool setNominalCapacity(double nominalCapacity);
76
77 void resetNominalCapacity();
78
79 void autosizeNominalCapacity();
80
81 bool setTemperatureSetpointNode(Node& temperatureSetpointNode);
82
83 void resetTemperatureSetpointNode();
84
85 //@}
86
87 /** Creates a new equivalent duct object if an object is not already attached. */
88 AirflowNetworkEquivalentDuct getAirflowNetworkEquivalentDuct(double length, double diameter);
89
90 /** Returns the attached equivalent duct object, if any. */
91 boost::optional<AirflowNetworkEquivalentDuct> airflowNetworkEquivalentDuct() const;
92
93 boost::optional<double> autosizedNominalCapacity() const;
94
95 protected:
96 /// @cond
97
98 using ImplType = detail::CoilHeatingElectric_Impl;
99
100 friend class detail::CoilHeatingElectric_Impl;
101
102 friend class Model;
103
104 friend class openstudio::IdfObject;
105
106 explicit CoilHeatingElectric(std::shared_ptr<detail::CoilHeatingElectric_Impl> impl);
107
108 /// @endcond
109
110 private:
111 REGISTER_LOGGER("openstudio.model.CoilHeatingElectric");
112 };
113
114 /** \relates CoilHeatingElectric*/
115 using OptionalCoilHeatingElectric = boost::optional<CoilHeatingElectric>;
116
117 /** \relates CoilHeatingElectric*/
118 using CoilHeatingElectricVector = std::vector<CoilHeatingElectric>;
119
120 } // namespace model
121
122 } // namespace openstudio
123
124 #endif // MODEL_COILHEATINGELECTRIC_HPP
125