Emergency 20 Dokumentation  4.2.0
MapIdentifier.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"
15 
18 
19 
20 //[-------------------------------------------------------]
21 //[ Namespace ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25 
26 
27  //[-------------------------------------------------------]
28  //[ Classes ]
29  //[-------------------------------------------------------]
35  {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Public static definitions ]
40  //[-------------------------------------------------------]
41  public:
42  // Identifiers
43  static const std::string MAP_MUNICH;
44  static const std::string MAP_HAMBURG;
45  static const std::string MAP_BERLIN;
46  static const std::string MAP_COLOGNE;
47  static const std::string MAP_MEDIEVAL;
48  static const std::string MAP_MEDIEVAL_HAMBURG;
49  enum MapIndex
50  {
51  MAP_MUNICH_INDEX = 0,
56  MAP_MEDIEVAL_HAMBURG_INDEX
57  };
58 
59  // Local map asset names
60  static const std::string MAP_MUNICH_LOCAL_ASSET_NAME;
61  static const std::string MAP_HAMBURG_LOCAL_ASSET_NAME;
62  static const std::string MAP_BERLIN_LOCAL_ASSET_NAME;
63  static const std::string MAP_COLOGNE_LOCAL_ASSET_NAME;
64  static const std::string MAP_MEDIEVAL_LOCAL_ASSET_NAME;
65  static const std::string MAP_MEDIEVAL_HAMBURG_LOCAL_ASSET_NAME;
66 
67 
68  //[-------------------------------------------------------]
69  //[ Public static methods ]
70  //[-------------------------------------------------------]
71  public:
72  static MapIdentifier getMunich();
73  static MapIdentifier getHamburg();
74  static MapIdentifier getBerlin();
75  static MapIdentifier getCologne();
76  static MapIdentifier getMedivial();
77  static MapIdentifier getMedivialHamburg();
78 
79  static MapIdentifier fromIdentifier(const std::string& identifier);
80  static MapIdentifier fromLocalAssetName(const std::string& localAssetName);
81  static MapIdentifier fromGlobalAssetId(const qsf::GlobalAssetId& globalAssetId);
82 
83 
84  //[-------------------------------------------------------]
85  //[ Public methods ]
86  //[-------------------------------------------------------]
87  public:
92  MapIdentifier();
93 
98  explicit MapIdentifier(int32 index);
99 
104  ~MapIdentifier();
105 
106  inline bool isOriginalMap() const;
107  inline int32 getIndex() const;
108  inline const std::string& getIdentifier() const;
109  std::string getLocalizationString() const;
110  inline const std::string& getLocalAssetName() const;
111  inline const MainEventIdentifier& getSecondLastMainEventIdentifier() const;
112 
113  inline const std::string& getWorldEventEventPools() const;
114  inline const std::vector<std::string>& getSeasonalEvents() const;
115 
116  inline bool operator==(const MapIdentifier& other) const;
117 
118 
119  //[-------------------------------------------------------]
120  //[ Private data ]
121  //[-------------------------------------------------------]
122  private:
123  int32 mIndex;
124  std::string mIdentifier;
125  qsf::NamedIdentifier mLocalAssetName;
126  MainEventIdentifier mSecondLastMainEventIdentifier;
127  std::string mWorldEventEventPools;
128  std::vector<std::string> mSeasonalEvents;
129 
130 
131  };
132 
133 
134 //[-------------------------------------------------------]
135 //[ Namespace ]
136 //[-------------------------------------------------------]
137 } // em5
138 
139 
140 //[-------------------------------------------------------]
141 //[ Implementation ]
142 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
static const std::string MAP_COLOGNE
Definition: MapIdentifier.h:46
Definition: MapIdentifier.h:53
static const std::string MAP_MEDIEVAL
Definition: MapIdentifier.h:47
static const std::string MAP_COLOGNE_LOCAL_ASSET_NAME
Definition: MapIdentifier.h:63
#define EM5_API_EXPORT
Definition: Export.h:28
static const std::string MAP_MUNICH
Definition: MapIdentifier.h:43
static const std::string MAP_HAMBURG
Definition: MapIdentifier.h:44
MapIndex
Definition: MapIdentifier.h:49
Definition: MapIdentifier.h:52
static const std::string MAP_MEDIEVAL_HAMBURG
Definition: MapIdentifier.h:48
EMERGENCY 5 main event identifier class.
Definition: MainEventIdentifier.h:30
static const std::string MAP_BERLIN
Definition: MapIdentifier.h:45
EMERGENCY 5 map identifier class.
Definition: MapIdentifier.h:34
Definition: MapIdentifier.h:54
signed int int32
Definition: PlatformTypes.h:180
static const std::string MAP_HAMBURG_LOCAL_ASSET_NAME
Definition: MapIdentifier.h:61
static const std::string MAP_MEDIEVAL_HAMBURG_LOCAL_ASSET_NAME
Definition: MapIdentifier.h:65
static const std::string MAP_MUNICH_LOCAL_ASSET_NAME
Definition: MapIdentifier.h:60
static const std::string MAP_MEDIEVAL_LOCAL_ASSET_NAME
Definition: MapIdentifier.h:64
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
Definition: MapIdentifier.h:55
static const std::string MAP_BERLIN_LOCAL_ASSET_NAME
Definition: MapIdentifier.h:62
uint64 GlobalAssetId
Definition: AssetSystemTypes.h:28