Emergency 20 Dokumentation  4.2.0
BuildingLightTimeControlComponent.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
14 
15 
16 //[-------------------------------------------------------]
17 //[ Namespace ]
18 //[-------------------------------------------------------]
19 namespace em5
20 {
21 
22 
23  //[-------------------------------------------------------]
24  //[ Classes ]
25  //[-------------------------------------------------------]
31  {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Public definitions ]
36  //[-------------------------------------------------------]
37  public:
38  static const uint32 COMPONENT_ID;
39 
40 
41  //[-------------------------------------------------------]
42  //[ Public methods ]
43  //[-------------------------------------------------------]
44  public:
52  inline explicit BuildingLightTimeControlComponent(qsf::Prototype* prototype);
53 
58  inline virtual ~BuildingLightTimeControlComponent();
59 
71  inline const qsf::AssetProxy& getWindowEmissiveMaterial() const;
72 
84  inline void setWindowEmissiveMaterial(const qsf::AssetProxy& material);
85 
96  inline const qsf::Time getWindowLightEarliestOnTime() const;
97 
108  inline void setWindowLightEarliestOnTime(const qsf::Time& time);
109 
120  inline const qsf::Time getWindowLightLatestOnTime() const;
121 
132  inline void setWindowLightLatestOnTime(const qsf::Time& time);
133 
144  inline const qsf::Time getWindowLightEarliestOffTime() const;
145 
156  inline void setWindowLightEarliestOffTime(const qsf::Time& time);
157 
168  inline const qsf::Time getWindowLightLatestOffTime() const;
169 
180  inline void setWindowLightLatestOffTime(const qsf::Time& time);
181 
182 
183  //[-------------------------------------------------------]
184  //[ Protected virtual qsf::Component methods ]
185  //[-------------------------------------------------------]
186  protected:
187  virtual bool onStartup() override;
188  virtual void serialize(qsf::BinarySerializer& serializer) override;
189 
190 
191  //[-------------------------------------------------------]
192  //[ Protected virtual em5::LightTimeControlComponent methods ]
193  //[-------------------------------------------------------]
194  protected:
195  virtual void onUpdateLightState(const qsf::Time& currentTimeOfDay, bool forceSet) override;
196  virtual void enableChildLights(bool enable) override;
197  virtual void switchOffAllLights() override;
198 
199 
200  //[-------------------------------------------------------]
201  //[ Private data ]
202  //[-------------------------------------------------------]
203  private:
204  qsf::AssetProxy mWindowEmissiveMaterial;
205  qsf::Time mWindowLightEarliestOnTime;
206  qsf::Time mWindowLightLatestOnTime;
207  qsf::Time mWindowLightEarliestOffTime;
208  qsf::Time mWindowLightLatestOffTime;
209 
210  qsf::Time mWindowLightOnTime;
211  qsf::Time mWindowLightOffTime;
212 
213  bool mWindowLightIsOnStatus;
214 
215 
216  //[-------------------------------------------------------]
217  //[ CAMP reflection system ]
218  //[-------------------------------------------------------]
219  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
220 
221 
222  };
223 
224 
225 //[-------------------------------------------------------]
226 //[ Namespace ]
227 //[-------------------------------------------------------]
228 } // em5
229 
230 
231 //[-------------------------------------------------------]
232 //[ Implementation ]
233 //[-------------------------------------------------------]
235 
236 
237 //[-------------------------------------------------------]
238 //[ CAMP reflection system ]
239 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
static const uint32 COMPONENT_ID
"em5::BuildingLightTimeControlComponent" unique component ID
Definition: BuildingLightTimeControlComponent.h:38
EMERGENCY 5 building light time control component class.
Definition: BuildingLightTimeControlComponent.h:30
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
EMERGENCY 5 light time control component class.
Definition: LightTimeControlComponent.h:34
Asset proxy class.
Definition: AssetProxy.h:57
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
Prototype class.
Definition: Prototype.h:100
Binary serializer class.
Definition: BinarySerializer.h:35
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32