Emergency 20 Dokumentation  4.2.0
EnterRescueHeliAction.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  //[-------------------------------------------------------]
34  {
35 
36 
37  //[-------------------------------------------------------]
38  //[ Public definitions ]
39  //[-------------------------------------------------------]
40  public:
42 
43  enum State
44  {
50  STATE_DONE
51  };
52 
53 
54  //[-------------------------------------------------------]
55  //[ Public methods ]
56  //[-------------------------------------------------------]
57  public:
63 
68  virtual ~EnterRescueHeliAction();
69 
70  void init(qsf::Entity& targetEntity);
71  uint64 getTargetId() const;
72 
73 
74  //[-------------------------------------------------------]
75  //[ Public virtual qsf::Actions methods ]
76  //[-------------------------------------------------------]
77  public:
78  virtual void serialize(qsf::BinarySerializer& serializer) override;
79 
80 
81  //[-------------------------------------------------------]
82  //[ Protected virtual qsf::Action methods ]
83  //[-------------------------------------------------------]
84  protected:
85  virtual bool onStartup() override;
86  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
87 
88 
89  //[-------------------------------------------------------]
90  //[ Private methods ]
91  //[-------------------------------------------------------]
92  private:
93  void prepareParamedicForEnter();
94 
95 
96  //[-------------------------------------------------------]
97  //[ Private data ]
98  //[-------------------------------------------------------]
99  private:
100  State mState;
101  qsf::WeakPtr<qsf::Entity> mTargetEntity;
102  qsf::Time mTimeTillDoorsClosed;
103  qsf::WeakPtr<qsf::Entity> mPatientEntity;
104 
105 
106  //[-------------------------------------------------------]
107  //[ CAMP reflection system ]
108  //[-------------------------------------------------------]
109  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
110 
111 
112  };
113 
114 
115 //[-------------------------------------------------------]
116 //[ Namespace ]
117 //[-------------------------------------------------------]
118 } // em5
119 
120 
121 //[-------------------------------------------------------]
122 //[ CAMP reflection system ]
123 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
State
Definition: EnterRescueHeliAction.h:43
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
uint64_t uint64
Definition: PlatformTypes.h:184
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
EMERGENCY 5 exit from rescue helicopter action.
Definition: ExitRescueHeliAction.h:39
State
Definition: ProcessState.h:20
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
Definition: EnterRescueHeliAction.h:48
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
EMERGENCY 5 enter rescue helicopter with paramedic action.
Definition: EnterRescueHeliAction.h:33
Definition: EnterRescueHeliAction.h:45
Definition: EnterRescueHeliAction.h:46
static const qsf::NamedIdentifier ACTION_ID
"em5::EnterRescueHeliAction" unique action identifier
Definition: EnterRescueHeliAction.h:41
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
Definition: EnterRescueHeliAction.h:49
Binary serializer class.
Definition: BinarySerializer.h:35
Result
Definition: ActionResult.h:20
Definition: EnterRescueHeliAction.h:47
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32