Emergency 20 Dokumentation  4.2.0
ArrivedAtBaseAction.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 
18 
19 
20 //[-------------------------------------------------------]
21 //[ Forward declarations ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25  class VehicleComponent;
26 }
27 
28 
29 //[-------------------------------------------------------]
30 //[ Namespace ]
31 //[-------------------------------------------------------]
32 namespace em5
33 {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Classes ]
38  //[-------------------------------------------------------]
47  {
48 
49 
50  //[-------------------------------------------------------]
51  //[ Public definitions ]
52  //[-------------------------------------------------------]
53  public:
55 
56 
57  //[-------------------------------------------------------]
58  //[ Public methods ]
59  //[-------------------------------------------------------]
60  public:
66 
71  virtual ~ArrivedAtBaseAction();
72 
80  void init(const qsf::logic::TargetPoint& targetPoint);
81 
82 
83  //[-------------------------------------------------------]
84  //[ Public virtual qsf::Actions methods ]
85  //[-------------------------------------------------------]
86  public:
87  virtual void serialize(qsf::BinarySerializer& serializer) override;
88 
89 
90  //[-------------------------------------------------------]
91  //[ Protected virtual qsf::Action methods ]
92  //[-------------------------------------------------------]
93  protected:
94  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
95 
96 
97  //[-------------------------------------------------------]
98  //[ Private methods ]
99  //[-------------------------------------------------------]
100  private:
101  void sendMessageForChilds(VehicleComponent& vehicleComponent);
102 
103 
104  //[-------------------------------------------------------]
105  //[ Private data ]
106  //[-------------------------------------------------------]
107  private:
108  qsf::logic::TargetPoint mTargetPoint;
109 
110 
111  //[-------------------------------------------------------]
112  //[ CAMP reflection system ]
113  //[-------------------------------------------------------]
114  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
115 
116 
117  };
118 
119 
120 //[-------------------------------------------------------]
121 //[ Namespace ]
122 //[-------------------------------------------------------]
123 } // em5
124 
125 
126 //[-------------------------------------------------------]
127 //[ CAMP reflection system ]
128 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
A target point is a spatial configuration that allows an interaction between two entities. Since a target point is relative to the interacting as well as the interacted on entity it can be dynamic and is often invalidated as soon as one of the entities moves. Simple class that is copyable via the default mechanisms and public members because it is only a tiny data collection.
Definition: TargetPoint.h:39
EMERGENCY 5 arrived at base action.
Definition: ArrivedAtBaseAction.h:46
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
Vehicle component base class.
Definition: VehicleComponent.h:49
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
#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
Abstract action base class.
Definition: Action.h:59
static const qsf::NamedIdentifier ACTION_ID
"em5::ArrivedAtBaseAction" unique action identifier
Definition: ArrivedAtBaseAction.h:54
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
Binary serializer class.
Definition: BinarySerializer.h:35
Result
Definition: ActionResult.h:20