Emergency 20 Dokumentation  4.2.0
BoatLogic.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>
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::BoatLogic" game logic type ID
42 
43 
44  //[-------------------------------------------------------]
45  //[ Public methods ]
46  //[-------------------------------------------------------]
47  public:
52  BoatLogic();
53 
54 
55  //[-------------------------------------------------------]
56  //[ Public virtual qsf::GameLogic methods ]
57  //[-------------------------------------------------------]
58  public:
59  virtual bool onStartup() override;
60  virtual void onShutdown() override;
61 
62 
63  //[-------------------------------------------------------]
64  //[ Private methods ]
65  //[-------------------------------------------------------]
66  private:
67  void updateSimulation(const qsf::JobArguments& jobArguments);
68  void performAutomatism();
69 
70  bool rescuePersonAutomatism();
71  bool placePersonAutomatism();
72 
73 
74  //[-------------------------------------------------------]
75  //[ Private data ]
76  //[-------------------------------------------------------]
77  private:
78  qsf::Time mTimeWaiting;
79 
80  // Job proxies
81  qsf::JobProxy mSimulationJobProxy;
82 
83 
84  //[-------------------------------------------------------]
85  //[ CAMP reflection system ]
86  //[-------------------------------------------------------]
87  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
88 
89 
90  };
91 
92 
93 //[-------------------------------------------------------]
94 //[ Namespace ]
95 //[-------------------------------------------------------]
96 } // em5
97 
98 
99 //[-------------------------------------------------------]
100 //[ CAMP reflection system ]
101 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
EMERGENCY 5 boat logic ("Motorboat")
Definition: BoatLogic.h:33
unsigned int uint32
Definition: PlatformTypes.h:181
#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
static const uint32 GAMELOGIC_TYPE_ID
Definition: BoatLogic.h:41
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32