Emergency 20 Dokumentation  4.2.0
EngineerLogic.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 
17 
18 
19 //[-------------------------------------------------------]
20 //[ Forward declarations ]
21 //[-------------------------------------------------------]
22 namespace qsf
23 {
24  class ActionComponent;
25 }
26 
27 
28 //[-------------------------------------------------------]
29 //[ Namespace ]
30 //[-------------------------------------------------------]
31 namespace em5
32 {
33 
34 
35  //[-------------------------------------------------------]
36  //[ Classes ]
37  //[-------------------------------------------------------]
43  {
44 
45 
46  //[-------------------------------------------------------]
47  //[ Public definitions ]
48  //[-------------------------------------------------------]
49  public:
50  static const uint32 GAMELOGIC_TYPE_ID; // "em5::EngineerLogic" game logic type ID
51 
52 
53  //[-------------------------------------------------------]
54  //[ Public methods ]
55  //[-------------------------------------------------------]
56  public:
57  EngineerLogic();
58 
59 
60  //[-------------------------------------------------------]
61  //[ Public virtual qsf::GameLogic methods ]
62  //[-------------------------------------------------------]
63  public:
64  virtual bool onStartup() override;
65  virtual void onShutdown() override;
66 
67 
68  //[-------------------------------------------------------]
69  //[ Private definitions ]
70  //[-------------------------------------------------------]
71  private:
72  static const uint32 ACTION_PRIORITY;
73 
74 
75  //[-------------------------------------------------------]
76  //[ Private methods ]
77  //[-------------------------------------------------------]
78  private:
86  void takeToolboxFromVehicle(const qsf::MessageParameters& parameters);
87 
95  void putToolboxInVehicle(const qsf::MessageParameters& parameters);
96 
97  void startWaitForEnterVehicle(const qsf::MessageParameters& parameters);
98  void abortWaitForEnterVehicle(const qsf::MessageParameters& parameters);
99 
100  void pushSignalActionAndSetupMessageHandler(uint64 vehicleEntityId, qsf::ActionComponent& actionComponent);
101 
102 
103  //[-------------------------------------------------------]
104  //[ Private data ]
105  //[-------------------------------------------------------]
106  private:
107  // We need this message proxy to get or put away the toolbox and have a safe serialization
108  qsf::MessageProxy mExitVehicleProxy;
109  qsf::MessageProxy mEnterVehicleProxy;
110  qsf::MessageProxy mEnterVehicleWithoutEquipmentProxy;
111  qsf::MessageProxy mEnterVehicleWithoutEquipmentAbortProxy;
112 
113 
114  //[-------------------------------------------------------]
115  //[ CAMP reflection system ]
116  //[-------------------------------------------------------]
117  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
118 
119 
120  };
121 
122 
123 //[-------------------------------------------------------]
124 //[ Namespace ]
125 //[-------------------------------------------------------]
126 } // em5
127 
128 
129 //[-------------------------------------------------------]
130 //[ CAMP reflection system ]
131 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Message parameters class.
Definition: MessageParameters.h:34
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
Message listener proxy class.
Definition: MessageProxy.h:47
uint64_t uint64
Definition: PlatformTypes.h:184
Definition: PickupPersonByParamedicAction.h:21
#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
Action component.
Definition: ActionComponent.h:47
Game logic base class.
Definition: GameLogic.h:44
static const uint32 GAMELOGIC_TYPE_ID
Definition: EngineerLogic.h:50
Engineer logic.
Definition: EngineerLogic.h:42