GCC Code Coverage Report


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

src/model/OtherEquipment.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_OTHEREQUIPMENT_HPP
7 #define MODEL_OTHEREQUIPMENT_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadInstance.hpp"
11
12 namespace openstudio {
13
14 class FuelType;
15
16 namespace model {
17
18 class OtherEquipmentDefinition;
19 class Schedule;
20
21 namespace detail {
22
23 class OtherEquipment_Impl;
24
25 } // namespace detail
26
27 /** OtherEquipment is a SpaceLoadInstance that wraps the OpenStudio IDD object
28 * 'OS:OtherEquipment'. \sa OtherEquipmentDefinition */
29 class MODEL_API OtherEquipment : public SpaceLoadInstance
30 {
31 public:
32 /** @name Constructors and Destructors */
33 //@{
34
35 explicit OtherEquipment(const OtherEquipmentDefinition& definition);
36
37 42 virtual ~OtherEquipment() override = default;
38 // Default the copy and move operators because the virtual dtor is explicit
39 ✗ OtherEquipment(const OtherEquipment& other) = default;
40 13 OtherEquipment(OtherEquipment&& other) = default;
41 ✗ OtherEquipment& operator=(const OtherEquipment&) = default;
42 ✗ OtherEquipment& operator=(OtherEquipment&&) = default;
43
44 //@}
45
46 static IddObjectType iddObjectType();
47
48 /** @name Getters */
49 //@{
50
51 /** Returns the End-Use Subcategory **/
52 std::string endUseSubcategory() const;
53
54 /** Returns true if the end-use subcategory is defaulted **/
55 bool isEndUseSubcategoryDefaulted() const;
56
57 /** Returns a list of valid fuel types. **/
58 static std::vector<std::string> validFuelTypeValues();
59
60 /** Gets the equipment fuel type **/
61 std::string fuelType() const;
62
63 /** Returns true if the fuel type is defaulted **/
64 bool isFuelTypeDefaulted() const;
65
66 OtherEquipmentDefinition otherEquipmentDefinition() const;
67
68 /** Returns the (fractional) equipment schedule. If this object does not
69 * specify a schedule this function will search the hierarchy. */
70 boost::optional<Schedule> schedule() const;
71
72 /** Returns true if this object does not specify a schedule directly. */
73 bool isScheduleDefaulted() const;
74
75 //@}
76 /** @name Setters */
77 //@{
78
79 /** Sets the End-Use Subcategory **/
80 bool setEndUseSubcategory(const std::string& endUseSubcategory);
81
82 /** Resets the End-Use Subcategory **/
83 void resetEndUseSubcategory();
84
85 /** Sets the fuel type. **/
86 bool setFuelType(const FuelType& fuelType);
87
88 bool setFuelType(const std::string& fuelType);
89
90 /** Resets the fuel type to its default. **/
91 void resetFuelType();
92
93 bool setOtherEquipmentDefinition(const OtherEquipmentDefinition& definition);
94
95 /** Sets the (fractional) Schedule. */
96 bool setSchedule(Schedule& schedule);
97
98 /** Resets the (fractional) Schedule. */
99 void resetSchedule();
100
101 bool setMultiplier(double multiplier);
102
103 void resetMultiplier();
104
105 //@}
106 /** @name Other */
107 //@{
108
109 /** Returns the design level represented by this instance, assuming floorArea (m^2) and
110 * numPeople. */
111 double getDesignLevel(double floorArea, double numPeople) const;
112
113 /** Returns the watts/m^2 represented by this instance, assuming floorArea (m^2) and
114 * numPeople. */
115 double getPowerPerFloorArea(double floorArea, double numPeople) const;
116
117 /** Returns the watts/person represented by this instance, assuming floorArea (m^2) and
118 * numPeople. */
119 double getPowerPerPerson(double floorArea, double numPeople) const;
120
121 //@}
122 protected:
123 /// @cond
124 using ImplType = detail::OtherEquipment_Impl;
125
126 friend class detail::OtherEquipment_Impl;
127 friend class openstudio::detail::IdfObject_Impl;
128 friend class IdfObject;
129 friend class Model;
130
131 explicit OtherEquipment(std::shared_ptr<detail::OtherEquipment_Impl> impl);
132
133 /// @endcond
134 private:
135 − REGISTER_LOGGER("openstudio.model.OtherEquipment");
136 };
137
138 /** \relates OtherEquipment*/
139 using OptionalOtherEquipment = boost::optional<OtherEquipment>;
140
141 /** \relates OtherEquipment*/
142 using OtherEquipmentVector = std::vector<OtherEquipment>;
143
144 } // namespace model
145 } // namespace openstudio
146
147 #endif // MODEL_OTHEREQUIPMENT_HPP
148