GCC Code Coverage Report


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

src/model/SteamEquipment_Impl.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_IMPL_HPP
7 #define MODEL_STEAMEQUIPMENT_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadInstance_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class SteamEquipmentDefinition;
16 class Schedule;
17
18 namespace detail {
19
20 /** SteamEquipment_Impl is a SpaceLoadInstance_Impl that is the implementation class for SteamEquipment.*/
21 class MODEL_API SteamEquipment_Impl : public SpaceLoadInstance_Impl
22 {
23 public:
24 /** @name Constructors and Destructors */
25 //@{
26
27 SteamEquipment_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
28
29 SteamEquipment_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
30
31 SteamEquipment_Impl(const SteamEquipment_Impl& other, Model_Impl* model, bool keepHandle);
32
33 9 virtual ~SteamEquipment_Impl() override = default;
34
35 //@}
36 /** @name Virtual Methods */
37 //@{
38
39 virtual const std::vector<std::string>& outputVariableNames() const override;
40
41 virtual IddObjectType iddObjectType() const override;
42
43 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
44
45 virtual bool hardSize() override;
46
47 virtual bool hardApplySchedules() override;
48
49 virtual double multiplier() const override;
50
51 virtual bool isMultiplierDefaulted() const override;
52
53 virtual bool isAbsolute() const override;
54
55 //@}
56 /** @name Getters */
57 //@{
58
59 SteamEquipmentDefinition steamEquipmentDefinition() const;
60
61 /** Returns the (fractional) equipment schedule. If this object does not
62 * specify a schedule this function will search the hierarchy. */
63 boost::optional<Schedule> schedule() const;
64
65 /** Returns true if this object does not specify a schedule directly. */
66 bool isScheduleDefaulted() const;
67
68 std::string endUseSubcategory() const;
69
70 bool isEndUseSubcategoryDefaulted() const;
71
72 //@}
73 /** @name Setters */
74 //@{
75
76 bool setSteamEquipmentDefinition(const SteamEquipmentDefinition& definition);
77
78 /** Sets the definition of this instance. */
79 virtual bool setDefinition(const SpaceLoadDefinition& definition) override;
80
81 /** Sets the (fractional) Schedule. */
82 bool setSchedule(Schedule& schedule);
83
84 /** Resets the (fractional) Schedule. */
85 void resetSchedule();
86
87 bool setMultiplier(double multiplier);
88
89 void resetMultiplier();
90
91 bool setEndUseSubcategory(const std::string& endUseSubcategory);
92
93 void resetEndUseSubcategory();
94
95 //@}
96 /** @name Other */
97 //@{
98
99 /** Returns the design level represented by this instance, assuming floorArea (m^2) and
100 * numPeople. */
101 double getDesignLevel(double floorArea, double numPeople) const;
102
103 /** Returns the watts/m^2 represented by this instance, assuming floorArea (m^2) and
104 * numPeople. */
105 double getPowerPerFloorArea(double floorArea, double numPeople) const;
106
107 /** Returns the watts/person represented by this instance, assuming floorArea (m^2) and
108 * numPeople. */
109 double getPowerPerPerson(double floorArea, double numPeople) const;
110
111 virtual std::vector<EMSActuatorNames> emsActuatorNames() const override;
112
113 virtual std::vector<std::string> emsInternalVariableNames() const override;
114
115 //@}
116 protected:
117 // index of the space name
118 virtual int spaceIndex() const override;
119
120 // index of the definition name
121 virtual int definitionIndex() const override;
122
123 private:
124 REGISTER_LOGGER("openstudio.model.SteamEquipment");
125
126 boost::optional<ModelObject> steamEquipmentDefinitionAsModelObject() const;
127 boost::optional<ModelObject> scheduleAsModelObject() const;
128
129 bool setSteamEquipmentDefinitionAsModelObject(const boost::optional<ModelObject>& modelObject);
130 bool setScheduleAsModelObject(const boost::optional<ModelObject>& modelObject);
131 };
132
133 } // namespace detail
134
135 } // namespace model
136 } // namespace openstudio
137
138 #endif // MODEL_STEAMEQUIPMENT_IMPL_HPP
139