Emergency 20 Dokumentation  4.2.0
DLKLogic.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 
15 #include <qsf/job/JobProxy.h>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Forward declarations ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25  class BuildingComponent;
26 }
27 namespace qsf
28 {
29  class Entity;
30 }
31 
32 
33 //[-------------------------------------------------------]
34 //[ Namespace ]
35 //[-------------------------------------------------------]
36 namespace em5
37 {
38 
39 
40  //[-------------------------------------------------------]
41  //[ Classes ]
42  //[-------------------------------------------------------]
48  {
49 
50 
51  //[-------------------------------------------------------]
52  //[ Public definitions ]
53  //[-------------------------------------------------------]
54  public:
55  static const uint32 GAMELOGIC_TYPE_ID; // "em5::DLKLogic" game logic type ID
56 
57 
58  //[-------------------------------------------------------]
59  //[ Public static methods ]
60  //[-------------------------------------------------------]
61  public:
77  static BuildingComponent* getPlaceOfActionBuilding(qsf::Entity& entity);
78 
79 
80  //[-------------------------------------------------------]
81  //[ Public methods ]
82  //[-------------------------------------------------------]
83  public:
88  DLKLogic();
89 
94  bool isDeployed() const;
95 
100  void undeployBeforeMovingNext();
101 
102 
103  //[-------------------------------------------------------]
104  //[ Public virtual qsf::GameLogic methods ]
105  //[-------------------------------------------------------]
106  public:
107  virtual bool onStartup() override;
108  virtual void onShutdown() override;
109 
110 
111  //[-------------------------------------------------------]
112  //[ Private methods ]
113  //[-------------------------------------------------------]
114  private:
115  void performAutomatism();
116  void rescuePersonAutomatism();
117  void updateSimulation(const qsf::JobArguments& jobArguments);
118  void undeploy(const qsf::MessageParameters& parameters);
119 
120 
121  //[-------------------------------------------------------]
122  //[ Private data ]
123  //[-------------------------------------------------------]
124  private:
125  qsf::Time mTimeWaiting;
126  bool mDeployed;
127 
128  // Job proxies
129  qsf::JobProxy mSimulationJobProxy;
130 
131  // Message proxy for all possible Commands
132  qsf::MessageProxy mUndeployMessageProxyMoveCommand;
133  qsf::MessageProxy mUndeployMessageProxyReturnToBaseCommand;
134  qsf::MessageProxy mUndeployMessageProxyDLKSafePersonCommand;
135  qsf::MessageProxy mUndeployMessageProxyDLKExtinguishCommand;
136 
137 
138  //[-------------------------------------------------------]
139  //[ CAMP reflection system ]
140  //[-------------------------------------------------------]
141  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
142 
143 
144  };
145 
146 
147 //[-------------------------------------------------------]
148 //[ Namespace ]
149 //[-------------------------------------------------------]
150 } // em5
151 
152 
153 //[-------------------------------------------------------]
154 //[ CAMP reflection system ]
155 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
EMERGENCY 5 building component class.
Definition: BuildingComponent.h:56
Entity class.
Definition: Entity.h:46
Message parameters class.
Definition: MessageParameters.h:34
unsigned int uint32
Definition: PlatformTypes.h:181
DLK logic ("Drehleiter Kran Einsatzfahrzeug")
Definition: DLKLogic.h:47
#define EM5_API_EXPORT
Definition: Export.h:28
Message listener proxy class.
Definition: MessageProxy.h:47
static const uint32 GAMELOGIC_TYPE_ID
Definition: DLKLogic.h:55
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
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
Game logic base class.
Definition: GameLogic.h:44
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32