Emergency 20 Dokumentation  4.2.0
BlockedForEventComponent.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/job/JobProxy.h>
17 #include <qsf/time/Time.h>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Namespace ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25 
26 
27  //[-------------------------------------------------------]
28  //[ Classes ]
29  //[-------------------------------------------------------]
38  {
39 
40 
41  //[-------------------------------------------------------]
42  //[ Public definitions ]
43  //[-------------------------------------------------------]
44  public:
45  static const uint32 COMPONENT_ID;
46 
47 
48  //[-------------------------------------------------------]
49  //[ Public methods ]
50  //[-------------------------------------------------------]
51  public:
56  explicit BlockedForEventComponent(qsf::Prototype* prototype);
57 
58  qsf::Time getBlockedTime() const;
59  void setBlockedTime(qsf::Time blockedTime);
60 
61 
62  //[-------------------------------------------------------]
63  //[ Public virtual qsf::Component methods ]
64  //[-------------------------------------------------------]
65  public:
66  virtual void serialize(qsf::BinarySerializer& serializer) override;
67  virtual void onSetSimulating(bool simulating) override;
68  virtual void onShutdown() override;
69 
70 
71  //[-------------------------------------------------------]
72  //[ Private methods ]
73  //[-------------------------------------------------------]
74  private:
75  void updateSimulation(const qsf::JobArguments& jobArguments);
76 
77 
78  //[-------------------------------------------------------]
79  //[ Private data ]
80  //[-------------------------------------------------------]
81  private:
82  qsf::JobProxy mUpdateJobProxy;
83  qsf::Time mBlockedTimer;
84 
85 
86  //[-------------------------------------------------------]
87  //[ CAMP reflection system ]
88  //[-------------------------------------------------------]
89  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
90 
91 
92  };
93 
94 
95 //[-------------------------------------------------------]
96 //[ Namespace ]
97 //[-------------------------------------------------------]
98 } // em5
99 
100 
101 //[-------------------------------------------------------]
102 //[ CAMP reflection system ]
103 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
Abstract component class.
Definition: Component.h:105
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
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
EMERGENCY 5 blocked for event component class.
Definition: BlockedForEventComponent.h:37
#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
static const uint32 COMPONENT_ID
"em5::BlockedForEventComponent" unique component ID
Definition: BlockedForEventComponent.h:45
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