Orcus
|
#include <string_pool.hpp>
Public Member Functions | |
string_pool (const string_pool &)=delete | |
string_pool & | operator= (const string_pool &)=delete |
std::pair< std::string_view, bool > | intern (std::string_view str) |
std::vector< std::string_view > | get_interned_strings () const |
void | dump () const |
void | clear () |
size_t | size () const |
void | swap (string_pool &other) |
void | merge (string_pool &other) |
Implements string hash map.
std::vector<std::string_view> orcus::string_pool::get_interned_strings | ( | ) | const |
Return all interned strings.
std::pair<std::string_view, bool> orcus::string_pool::intern | ( | std::string_view | str | ) |
Intern a string.
str | string to intern. |
void orcus::string_pool::merge | ( | string_pool & | other | ) |
Merge another string pool instance in. This will not invalidate any string references to the other pool.
The other string pool instance will become empty when this call returns.
other | string pool instance to merge in. |