Emergency 20 Dokumentation  4.2.0
PlayerHelper.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/base/StringHash.h>
16 
17 #include <boost/noncopyable.hpp>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Forward declarations ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25  class Player;
26 }
27 namespace qsf
28 {
29  class Entity;
30  class Map;
31 }
32 
33 
34 //[-------------------------------------------------------]
35 //[ Namespace ]
36 //[-------------------------------------------------------]
37 namespace em5
38 {
39 
40 
41  //[-------------------------------------------------------]
42  //[ Classes ]
43  //[-------------------------------------------------------]
48  class EM5_API_EXPORT PlayerHelper : public boost::noncopyable
49  {
50 
51 
52  //[-------------------------------------------------------]
53  //[ Public methods ]
54  //[-------------------------------------------------------]
55  public:
60  explicit inline PlayerHelper(Player& player);
61 
66  inline ~PlayerHelper();
67 
68  // Available checks
69  bool isUnitAvailable(const qsf::Map& map, const qsf::StringHash& identifier) const;
70  uint32 getUnitAvailableCount(const qsf::Map& map, const qsf::StringHash& identifier) const;
71 
72  // Number of units
77  uint32 getNumberOfUnit(const qsf::StringHash& identifier) const;
78  uint32 getNumberAmbulanceMedics() const;
79  uint32 getNumberAmbulanceParamedics() const;
80  uint32 getNumberFireFightersFirefighter() const;
81  uint32 getNumberPolicePolice() const;
82  uint32 getNumberRescueDogLeader() const;
83 
84 
85  //[-------------------------------------------------------]
86  //[ Private data ]
87  //[-------------------------------------------------------]
88  private:
89  Player& mPlayer;
90 
91 
92  };
93 
94 
95 //[-------------------------------------------------------]
96 //[ Namespace ]
97 //[-------------------------------------------------------]
98 } // em5
99 
100 
101 //[-------------------------------------------------------]
102 //[ Implementation ]
103 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Map class.
Definition: Map.h:93
unsigned int uint32
Definition: PlatformTypes.h:181
EMERGENCY 5 player helper class.
Definition: PlayerHelper.h:48
#define EM5_API_EXPORT
Definition: Export.h:28
EMERGENCY 5 player class.
Definition: Player.h:57
Definition: PickupPersonByParamedicAction.h:21
Compile time string hash class.
Definition: StringHash.h:59