Argentum Online - Cliente
map_change_buffer.h
1 #ifndef __MAP_CHANGE_BUFFER_H
2 #define __MAP_CHANGE_BUFFER_H
3 #include <condition_variable>
4 #include <mutex>
5 
6 #include "../include/nlohmann/json.hpp"
7 
14  private:
15  std::mutex m;
16  std::condition_variable cv;
17  nlohmann::json map_info;
18  unsigned int follow_entity_id;
19  bool ready;
20 
21  public:
23  ~MapChangeBuffer();
24 
25  /* Llena el buffer con map info. */
33  void fill(nlohmann::json map_info, unsigned int follow_entity_id);
34 
40  nlohmann::json get_map_info();
41 
48 
53  void reset();
54 };
55 
56 #endif
MapChangeBuffer::get_follow_entity_id
int get_follow_entity_id()
Devuelve el id de la entidad que se debe seguir.
Definition: map_change_buffer.cpp:17
MapChangeBuffer::get_map_info
nlohmann::json get_map_info()
Devuelve la informacion almacenada en el mapa.
Definition: map_change_buffer.cpp:15
MapChangeBuffer::reset
void reset()
Reinicia el buffer.
Definition: map_change_buffer.cpp:19
MapChangeBuffer::fill
void fill(nlohmann::json map_info, unsigned int follow_entity_id)
Llena el buffer con nueva informacion para generar un nuevo mapa y un id de entidad nuevo.
Definition: map_change_buffer.cpp:7
MapChangeBuffer
Buffer donde se almacenan los mapas al inicializar, asi como informacion de la entidad que representa...
Definition: map_change_buffer.h:13