Emergency 20 Dokumentation  4.2.0
ObjectiveManager.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 em5
23 {
24  class Objective;
25 }
26 
27 
28 //[-------------------------------------------------------]
29 //[ Namespace ]
30 //[-------------------------------------------------------]
31 namespace em5
32 {
33 
34 
35  //[-------------------------------------------------------]
36  //[ Classes ]
37  //[-------------------------------------------------------]
46  {
47 
48 
49  //[-------------------------------------------------------]
50  //[ Friends ]
51  //[-------------------------------------------------------]
52  friend class ObjectiveList; // May insert serialized objectives
53  friend class FreeplaySystem; // For serialization
54 
55 
56  //[-------------------------------------------------------]
57  //[ Public methods ]
58  //[-------------------------------------------------------]
59  public:
65 
70  virtual ~ObjectiveManager();
71 
79  Objective* getObjectiveById(uint32 id) const;
80 
81  void registerObjective(Objective& objective);
82  void unregisterObjective(Objective& objective);
83 
84  //[-------------------------------------------------------]
85  //[ Serialize ]
86  //[-------------------------------------------------------]
87  void serialize(qsf::BinarySerializer& serializer);
88 
89 
90  //[-------------------------------------------------------]
91  //[ Private definitions ]
92  //[-------------------------------------------------------]
93  private:
94  typedef boost::container::flat_map<uint32, Objective*> ObjectiveMap;
95 
96 
97  //[-------------------------------------------------------]
98  //[ Private data ]
99  //[-------------------------------------------------------]
100  private:
102  ObjectiveMap mObjectives;
103 
104 
105  };
106 
107 
108 //[-------------------------------------------------------]
109 //[ Namespace ]
110 //[-------------------------------------------------------]
111 } // em5
Definition: ActionPriority.h:13
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
Abstract manager interface.
Definition: Manager.h:40
EMERGENCY 5 objective class.
Definition: Objective.h:51
EMERGENCY 5 objective manager.
Definition: ObjectiveManager.h:45
EMERGENCY 5 objective list class.
Definition: ObjectiveList.h:32
Binary serializer class.
Definition: BinarySerializer.h:35
EMERGENCY 5 freeplay system.
Definition: FreeplaySystem.h:55