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/Luminaire_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_LUMINAIRE_IMPL_HPP
7 #define MODEL_LUMINAIRE_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadInstance_Impl.hpp"
11
12 namespace openstudio {
13
14 class Point3d;
15 class Transformation;
16
17 namespace model {
18
19 class Schedule;
20 class LuminaireDefinition;
21 class Luminaire;
22
23 namespace detail {
24
25 /** Luminaire_Impl is a SpaceLoadInstance_Impl that is the implementation class for Luminaire.*/
26 class MODEL_API Luminaire_Impl : public SpaceLoadInstance_Impl
27 {
28
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32
33 Luminaire_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
34
35 Luminaire_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
36
37 Luminaire_Impl(const Luminaire_Impl& other, Model_Impl* model, bool keepHandle);
38
39 4 virtual ~Luminaire_Impl() override = default;
40
41 //@}
42 /** @name Virtual Methods */
43 //@{
44
45 virtual const std::vector<std::string>& outputVariableNames() const override;
46
47 virtual IddObjectType iddObjectType() const override;
48
49 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
50
51 virtual bool hardSize() override;
52
53 virtual bool hardApplySchedules() override;
54
55 virtual double multiplier() const override;
56
57 virtual bool isMultiplierDefaulted() const override;
58
59 virtual bool isAbsolute() const override;
60
61 //@}
62 /** @name Getters */
63 //@{
64
65 LuminaireDefinition luminaireDefinition() const;
66
67 boost::optional<Schedule> schedule() const;
68
69 bool isScheduleDefaulted() const;
70
71 double positionXcoordinate() const;
72
73 double positionYcoordinate() const;
74
75 double positionZcoordinate() const;
76
77 double psiRotationAroundXaxis() const;
78
79 bool isPsiRotationAroundXaxisDefaulted() const;
80
81 double thetaRotationAroundYaxis() const;
82
83 bool isThetaRotationAroundYaxisDefaulted() const;
84
85 double phiRotationAroundZaxis() const;
86
87 bool isPhiRotationAroundZaxisDefaulted() const;
88
89 double fractionReplaceable() const;
90
91 bool isFractionReplaceableDefaulted() const;
92
93 std::string endUseSubcategory() const;
94
95 bool isEndUseSubcategoryDefaulted() const;
96
97 //@}
98 /** @name Setters */
99 //@{
100
101 bool setLuminaireDefinition(const LuminaireDefinition& definition);
102
103 virtual bool setDefinition(const SpaceLoadDefinition& definition) override;
104
105 bool setSchedule(Schedule& schedule);
106
107 void resetSchedule();
108
109 bool setPositionXcoordinate(double positionXcoordinate);
110
111 bool setPositionYcoordinate(double positionYcoordinate);
112
113 bool setPositionZcoordinate(double positionZcoordinate);
114
115 bool setPsiRotationAroundXaxis(double psiRotationAroundXaxis);
116
117 void resetPsiRotationAroundXaxis();
118
119 bool setThetaRotationAroundYaxis(double thetaRotationAroundYaxis);
120
121 void resetThetaRotationAroundYaxis();
122
123 bool setPhiRotationAroundZaxis(double phiRotationAroundZaxis);
124
125 void resetPhiRotationAroundZaxis();
126
127 bool setFractionReplaceable(double fractionReplaceable);
128
129 void resetFractionReplaceable();
130
131 bool setMultiplier(double multiplier);
132
133 void resetMultiplier();
134
135 bool setEndUseSubcategory(const std::string& endUseSubcategory);
136
137 void resetEndUseSubcategory();
138
139 //@}
140 /** @name Other */
141 //@{
142
143 openstudio::Point3d position() const;
144
145 bool setPosition(const openstudio::Point3d& position);
146
147 openstudio::Transformation transformation() const;
148
149 bool setTransformation(const openstudio::Transformation& transformation);
150
151 double lightingPower() const;
152
153 double getPowerPerFloorArea(double floorArea) const;
154
155 double getPowerPerPerson(double numPeople) const;
156
157 //@}
158 protected:
159 // index of the space name
160 virtual int spaceIndex() const override;
161
162 // index of the definition name
163 virtual int definitionIndex() const override;
164
165 private:
166 REGISTER_LOGGER("openstudio.model.Luminaire");
167
168 boost::optional<ModelObject> luminaireDefinitionAsModelObject() const;
169 boost::optional<ModelObject> scheduleAsModelObject() const;
170
171 bool setLuminaireDefinitionAsModelObject(const boost::optional<ModelObject>& modelObject);
172 bool setScheduleAsModelObject(const boost::optional<ModelObject>& modelObject);
173 };
174
175 } // namespace detail
176
177 } // namespace model
178 } // namespace openstudio
179
180 #endif // MODEL_LUMINAIRE_IMPL_HPP
181