Argentum Online - Cliente
inventory_buffer.h
1
#ifndef __INVENTORY_BUFFER_H
2
#define __INVENTORY_BUFFER_H
3
#include "../include/nlohmann/json.hpp"
4
#include "views/game_view/inventory.h"
5
#include <mutex>
6
12
class
InventoryBuffer
{
13
private
:
14
nlohmann::json inventory_data;
15
std::mutex m;
16
17
public
:
18
InventoryBuffer
();
19
~
InventoryBuffer
();
20
26
void
push
(nlohmann::json new_nventory_data);
27
33
nlohmann::json
get_inventory_data
();
34
};
35
36
#endif
InventoryBuffer::push
void push(nlohmann::json new_nventory_data)
Agrega una nueva actualizacion del inventario al buffer.
Definition:
inventory_buffer.cpp:8
InventoryBuffer
Buffer en el cual se almacena la informacion del inventario recibida.
Definition:
inventory_buffer.h:12
InventoryBuffer::get_inventory_data
nlohmann::json get_inventory_data()
Devuelve la informacion del inventario almacenada.
Definition:
inventory_buffer.cpp:14
client
inventory_buffer.h
Generado por
1.8.19