2 #include "stringrefs.h" 9 return m_index.count(text) != 0;
14 auto it = m_index.find(text);
15 return it != m_index.end() ? it->second : keepString(text);
20 return (*
this)[
ref(text)];
25 assert(ix < m_storage.size());
uint32_t ref(const AnyString &text)
Get the unique id of a string.
Definition: stringrefs.hxx:13
AnyString operator[](uint32_t ix) const
Retrieve a stored string from its index.
Definition: stringrefs.hxx:24
AnyString refstr(const AnyString &text)
Add a new entry within the catalog.
Definition: stringrefs.hxx:19
bool exists(const AnyString &text) const
Get if a given string is already indexed.
Definition: stringrefs.hxx:8