Emergency 20 Dokumentation  4.2.0
TowcarLogic.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 #include <qsf/job/JobProxy.h>
17 
18 
19 //[-------------------------------------------------------]
20 //[ Namespace ]
21 //[-------------------------------------------------------]
22 namespace em5
23 {
24 
25 
26  //[-------------------------------------------------------]
27  //[ Classes ]
28  //[-------------------------------------------------------]
34  {
35 
36 
37  //[-------------------------------------------------------]
38  //[ Public definitions ]
39  //[-------------------------------------------------------]
40  public:
41  static const uint32 GAMELOGIC_TYPE_ID; // "em5::TowcarLogic" game logic type ID
42 
43 
44  //[-------------------------------------------------------]
45  //[ Public methods ]
46  //[-------------------------------------------------------]
47  public:
48  TowcarLogic();
49 
50 
51  //[-------------------------------------------------------]
52  //[ Public virtual qsf::GameLogic methods ]
53  //[-------------------------------------------------------]
54  public:
55  virtual bool onStartup() override;
56  virtual void onShutdown() override;
57 
58 
59  //[-------------------------------------------------------]
60  //[ Private definitions ]
61  //[-------------------------------------------------------]
62  private:
63  static const uint32 ACTION_PRIORITY;
64 
65 
66  //[-------------------------------------------------------]
67  //[ Private methods ]
68  //[-------------------------------------------------------]
69  private:
70  // Job update
71  void updateSimulation(const qsf::JobArguments& jobArguments);
72 
73  void pickupVehicleAutomatism();
74 
75 
76  //[-------------------------------------------------------]
77  //[ Private data ]
78  //[-------------------------------------------------------]
79  private:
80  // Job proxies for regular update
81  qsf::JobProxy mSimulationJobProxy;
82  qsf::Time mTimeWaiting;
83 
84 
85  //[-------------------------------------------------------]
86  //[ CAMP reflection system ]
87  //[-------------------------------------------------------]
88  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
89 
90 
91  };
92 
93 
94 //[-------------------------------------------------------]
95 //[ Namespace ]
96 //[-------------------------------------------------------]
97 } // em5
98 
99 
100 //[-------------------------------------------------------]
101 //[ CAMP reflection system ]
102 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
unsigned int uint32
Definition: PlatformTypes.h:181
static const uint32 GAMELOGIC_TYPE_ID
Definition: TowcarLogic.h:41
#define EM5_API_EXPORT
Definition: Export.h:28
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
#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
Towcar logic (de: Abschleppfahrzeug)
Definition: TowcarLogic.h:33
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32