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/SteamEquipment.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_STEAMEQUIPMENT_HPP
7 #define MODEL_STEAMEQUIPMENT_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadInstance.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class SteamEquipmentDefinition;
16 class Schedule;
17
18 namespace detail {
19
20 class SteamEquipment_Impl;
21
22 } // namespace detail
23
24 /** SteamEquipment is a SpaceLoadInstance that wraps the OpenStudio IDD object
25 * 'OS:SteamEquipment'. \sa SteamEquipmentDefinition
26 */
27 class MODEL_API SteamEquipment : public SpaceLoadInstance
28 {
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32
33 explicit SteamEquipment(const SteamEquipmentDefinition& definition);
34
35 29 virtual ~SteamEquipment() override = default;
36 // Default the copy and move operators because the virtual dtor is explicit
37 ✗ SteamEquipment(const SteamEquipment& other) = default;
38 8 SteamEquipment(SteamEquipment&& other) = default;
39 ✗ SteamEquipment& operator=(const SteamEquipment&) = default;
40 ✗ SteamEquipment& operator=(SteamEquipment&&) = default;
41
42 //@}
43
44 static IddObjectType iddObjectType();
45
46 /** @name Getters */
47 //@{
48
49 SteamEquipmentDefinition steamEquipmentDefinition() const;
50
51 /** Returns the (fractional) equipment schedule. If this object does not
52 * specify a schedule this function will search the hierarchy. */
53 boost::optional<Schedule> schedule() const;
54
55 /** Returns true if this object does not specify a schedule directly. */
56 bool isScheduleDefaulted() const;
57
58 std::string endUseSubcategory() const;
59
60 bool isEndUseSubcategoryDefaulted() const;
61
62 //@}
63 /** @name Setters */
64 //@{
65
66 bool setSteamEquipmentDefinition(const SteamEquipmentDefinition& definition);
67
68 /** Sets the (fractional) Schedule. */
69 bool setSchedule(Schedule& schedule);
70
71 /** Resets the (fractional) Schedule. */
72 void resetSchedule();
73
74 bool setMultiplier(double multiplier);
75
76 void resetMultiplier();
77
78 bool setEndUseSubcategory(const std::string& endUseSubcategory);
79
80 void resetEndUseSubcategory();
81
82 //@}
83 /** @name Other */
84 //@{
85
86 /** Returns the design level represented by this instance, assuming floorArea (m^2) and
87 * numPeople. */
88 double getDesignLevel(double floorArea, double numPeople) const;
89
90 /** Returns the watts/m^2 represented by this instance, assuming floorArea (m^2) and
91 * numPeople. */
92 double getPowerPerFloorArea(double floorArea, double numPeople) const;
93
94 /** Returns the watts/person represented by this instance, assuming floorArea (m^2) and
95 * numPeople. */
96 double getPowerPerPerson(double floorArea, double numPeople) const;
97
98 //@}
99 protected:
100 /// @cond
101 using ImplType = detail::SteamEquipment_Impl;
102
103 friend class detail::SteamEquipment_Impl;
104 friend class openstudio::detail::IdfObject_Impl;
105 friend class IdfObject;
106 friend class Model;
107
108 explicit SteamEquipment(std::shared_ptr<detail::SteamEquipment_Impl> impl);
109
110 /// @endcond
111 private:
112 REGISTER_LOGGER("openstudio.model.SteamEquipment");
113 };
114
115 /** \relates SteamEquipment*/
116 using OptionalSteamEquipment = boost::optional<SteamEquipment>;
117
118 /** \relates SteamEquipment*/
119 using SteamEquipmentVector = std::vector<SteamEquipment>;
120
121 } // namespace model
122 } // namespace openstudio
123
124 #endif // MODEL_STEAMEQUIPMENT_HPP
125