9#include <unordered_map>
28 void set(u16
id,
const std::string &name)
30 assert(!name.empty());
48 bool found =
getId(name,
id);
54 bool getName(u16
id, std::string &result)
const
62 bool getId(
const std::string &name, u16 &result)
const
Definition nameidmapping.h:17
void eraseName(const std::string &name)
Definition nameidmapping.h:45
void set(u16 id, const std::string &name)
Definition nameidmapping.h:28
void serialize(std::ostream &os) const
Definition nameidmapping.cpp:9
void clear()
Definition nameidmapping.h:22
u16 size() const
Definition nameidmapping.h:70
bool getName(u16 id, std::string &result) const
Definition nameidmapping.h:54
void removeId(u16 id)
Definition nameidmapping.h:35
NameToIdMap m_name_to_id
Definition nameidmapping.h:74
void deSerialize(std::istream &is)
Definition nameidmapping.cpp:19
bool getId(const std::string &name, u16 &result) const
Definition nameidmapping.h:62
IdToNameMap m_id_to_name
Definition nameidmapping.h:73
std::unordered_map< std::string, u16 > NameToIdMap
Definition nameidmapping.h:14
std::unordered_map< u16, std::string > IdToNameMap
Definition nameidmapping.h:13