Argentum Online - Servidor
map_manager.h
1 #ifndef MAP_MANAGER_H
2 #define MAP_MANAGER_H
3 
4 #include <unordered_map>
5 
6 #include "../../include/blocking_queue.h"
7 #include "../../include/types.h"
8 #include "map_monitor.h"
9 #include "map_transitions.h"
10 
11 class MapManager {
12  private:
13  const char* index_path;
14  std::unordered_map<MapId, MapMonitor> maps;
15  BlockingQueue<map_change_t> changes_queue;
16 
17  public:
18  MapManager(const char* index_path);
19  ~MapManager();
20 
21  void create_maps();
22 
23  MapMonitor& operator[](MapId map_id);
24 
25  const std::vector<MapId> get_ids();
26 
27  void update(uint64_t delta_t);
28 
29  map_change_t get_change();
30 
31  void close();
32 };
33 
34 #endif // MAP_MANAGER_H
map_change
Definition: map_transitions.h:11
MapManager
Definition: map_manager.h:11
MapMonitor
Definition: map_monitor.h:14
BlockingQueue
Definition: blocking_queue.h:22