Files
Cubed/include/Cubed/map_table.hpp

15 lines
415 B
C++

#pragma once
#include <string>
#include <unordered_map>
class MapTable {
private:
static std::unordered_map<unsigned, std::string> id_to_name_map;
static std::unordered_map<size_t, unsigned> name_to_id_map;
public:
// please using reference
static const std::string& get_name_from_id(unsigned id);
static const unsigned get_id_from_name(const std::string& name);
static void init_map();
};