Emergency 20 Dokumentation  4.2.0
LightControlComponent.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 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
16 #include <qsf/time/Time.h>
17 #include <qsf/job/JobProxy.h>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Namespace ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25 
26 
27  //[-------------------------------------------------------]
28  //[ Classes ]
29  //[-------------------------------------------------------]
39  {
40 
41 
42  //[-------------------------------------------------------]
43  //[ Public definitions ]
44  //[-------------------------------------------------------]
45  public:
46  static const uint32 COMPONENT_ID;
47 
48 
49  //[-------------------------------------------------------]
50  //[ Public static methods ]
51  //[-------------------------------------------------------]
52  public:
53  static void updateAllLightStates(const qsf::Time& currentTimeOfDay, bool forceSet, bool ignoreShouldBeSimulated = false);
54 
55 
56  //[-------------------------------------------------------]
57  //[ Public methods ]
58  //[-------------------------------------------------------]
59  public:
67  explicit LightControlComponent(qsf::Prototype* prototype);
68 
73  virtual ~LightControlComponent();
74 
75 
76  //[-------------------------------------------------------]
77  //[ Protected virtual qsf::Component methods ]
78  //[-------------------------------------------------------]
79  protected:
80  virtual void onSetSimulating(bool simulating) override;
81 
82 
83  //[-------------------------------------------------------]
84  //[ Private methods ]
85  //[-------------------------------------------------------]
86  private:
87  void updateSimulation(const qsf::JobArguments&);
88 
89 
90  //[-------------------------------------------------------]
91  //[ Private methods ]
92  //[-------------------------------------------------------]
93  private:
94  qsf::JobProxy mSimulationJobProxy;
95 
96 
97  //[-------------------------------------------------------]
98  //[ CAMP reflection system ]
99  //[-------------------------------------------------------]
100  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
101 
102 
103  };
104 
105 
106 //[-------------------------------------------------------]
107 //[ Namespace ]
108 //[-------------------------------------------------------]
109 } // em5
110 
111 
112 //[-------------------------------------------------------]
113 //[ CAMP reflection system ]
114 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
Abstract component class.
Definition: Component.h:105
EMERGENCY 5 light control core component class.
Definition: LightControlComponent.h:38
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
static const uint32 COMPONENT_ID
"em5::LightControlComponent" unique component ID
Definition: LightControlComponent.h:46
#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
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32