Emergency 20 Dokumentation  4.2.0
StartDroneAction.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 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23  class RoadVehicleComponent;
24 }
25 
26 
27 //[-------------------------------------------------------]
28 //[ Namespace ]
29 //[-------------------------------------------------------]
30 namespace em5
31 {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Classes ]
36  //[-------------------------------------------------------]
42  {
43 
44 
45  //[-------------------------------------------------------]
46  //[ Public definitions ]
47  //[-------------------------------------------------------]
48  public:
50 
51  enum State
52  {
57  STATE_DONE
58  };
59 
60 
61  //[-------------------------------------------------------]
62  //[ Public methods ]
63  //[-------------------------------------------------------]
64  public:
70 
75  virtual ~StartDroneAction();
76 
77 
78  //[-------------------------------------------------------]
79  //[ Public virtual qsf::Actions methods ]
80  //[-------------------------------------------------------]
81  public:
82  virtual void serialize(qsf::BinarySerializer& serializer) override;
83  virtual bool onStartup() override;
84 
85 
86  //[-------------------------------------------------------]
87  //[ Protected virtual qsf::Action methods ]
88  //[-------------------------------------------------------]
89  protected:
90  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
91 
92 
93  //[-------------------------------------------------------]
94  //[ Private data ]
95  //[-------------------------------------------------------]
96  private:
97  State mState;
98  qsf::WeakPtr<RoadVehicleComponent> mRoadVehicleComponent;
99  qsf::WeakPtr<qsf::Entity> mDroneEntity;
100 
101 
102  //[-------------------------------------------------------]
103  //[ CAMP reflection system ]
104  //[-------------------------------------------------------]
105  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
106 
107 
108  };
109 
110 
111 //[-------------------------------------------------------]
112 //[ Namespace ]
113 //[-------------------------------------------------------]
114 } // em5
115 
116 
117 //[-------------------------------------------------------]
118 //[ CAMP reflection system ]
119 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
State
Definition: StartDroneAction.h:51
static const qsf::NamedIdentifier ACTION_ID
"em5::StartDroneAction" unique action identifier
Definition: StartDroneAction.h:49
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: StartDroneAction.h:53
Definition: StartDroneAction.h:56
Lightweight weak pointer implementation.
Definition: WeakPtr.h:133
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
EMERGENCY 5 start drone action (from vehicle)
Definition: StartDroneAction.h:41
State
Definition: ProcessState.h:20
#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
Definition: StartDroneAction.h:54
Abstract action base class.
Definition: Action.h:59
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
Definition: StartDroneAction.h:55
Binary serializer class.
Definition: BinarySerializer.h:35
Result
Definition: ActionResult.h:20