GCC Code Coverage Report


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

src/model/ExteriorLights.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_EXTERIORLIGHTS_HPP
7 #define MODEL_EXTERIORLIGHTS_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ExteriorLoadInstance.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class ExteriorLightsDefinition;
16 class Schedule;
17 class Facility;
18
19 namespace detail {
20
21 class ExteriorLights_Impl;
22
23 } // namespace detail
24
25 /** ExteriorLights is a ExteriorLoadInstance that wraps the OpenStudio IDD object
26 * 'OS:Exterior:Lights'. ExteriorLights is a child of Facility and instances
27 * ExteriorLightsDefinition. */
28 class MODEL_API ExteriorLights : public ExteriorLoadInstance
29 {
30 public:
31 /** @name Constructors and Destructors */
32 //@{
33
34 /** This constructor sets schedule to always on, and provides the option to use the
35 * astronomical clock control option. */
36 ExteriorLights(const ExteriorLightsDefinition& definition, bool useControlOptionAstronomicalClock = false);
37
38 /** This constructor requires a user-specified schedule. */
39 ExteriorLights(const ExteriorLightsDefinition& definition, Schedule& schedule);
40
41 47 virtual ~ExteriorLights() override = default;
42 // Default the copy and move operators because the virtual dtor is explicit
43 1 ExteriorLights(const ExteriorLights& other) = default;
44 13 ExteriorLights(ExteriorLights&& other) = default;
45 ✗ ExteriorLights& operator=(const ExteriorLights&) = default;
46 ✗ ExteriorLights& operator=(ExteriorLights&&) = default;
47
48 //@}
49
50 static IddObjectType iddObjectType();
51
52 static std::vector<std::string> controlOptionValues();
53
54 /** \deprecated */
55 static std::vector<std::string> validControlOptionValues();
56
57 /** @name Getters */
58 //@{
59
60 ExteriorLightsDefinition exteriorLightsDefinition() const;
61
62 boost::optional<Schedule> schedule() const;
63
64 std::string controlOption() const;
65
66 bool isControlOptionDefaulted() const;
67
68 double multiplier() const;
69
70 bool isMultiplierDefaulted() const;
71
72 std::string endUseSubcategory() const;
73
74 bool isEndUseSubcategoryDefaulted() const;
75
76 //@}
77 /** @name Setters */
78 //@{
79
80 bool setExteriorLightsDefinition(const ExteriorLightsDefinition& exteriorLightsDefinition);
81
82 bool setSchedule(Schedule& schedule);
83
84 void resetSchedule();
85
86 bool setControlOption(const std::string& controlOption);
87
88 void resetControlOption();
89
90 bool setMultiplier(double multiplier);
91
92 void resetMultiplier();
93
94 bool setEndUseSubcategory(const std::string& endUseSubcategory);
95
96 void resetEndUseSubcategory();
97
98 //@}
99 /** @name Other */
100 //@{
101
102 Facility facility() const;
103
104 //@}
105 protected:
106 /// @cond
107 using ImplType = detail::ExteriorLights_Impl;
108
109 explicit ExteriorLights(std::shared_ptr<detail::ExteriorLights_Impl> impl);
110
111 friend class detail::ExteriorLights_Impl;
112 friend class Model;
113 friend class IdfObject;
114 friend class openstudio::detail::IdfObject_Impl;
115 /// @endcond
116 private:
117 − REGISTER_LOGGER("openstudio.model.ExteriorLights");
118 };
119
120 /** \relates ExteriorLights*/
121 using OptionalExteriorLights = boost::optional<ExteriorLights>;
122
123 /** \relates ExteriorLights*/
124 using ExteriorLightsVector = std::vector<ExteriorLights>;
125
126 } // namespace model
127 } // namespace openstudio
128
129 #endif // MODEL_EXTERIORLIGHTS_HPP
130