|
Orcus
|
#include <string_pool.hpp>
Public Member Functions | |
| string_pool (const string_pool &)=delete | |
| string_pool & | operator= (const string_pool &)=delete |
| std::pair< pstring, bool > | intern (const char *str) |
| std::pair< pstring, bool > | intern (const char *str, size_t n) |
| std::pair< pstring, bool > | intern (const pstring &str) |
| void | dump () const |
| void | clear () |
| size_t | size () const |
| void | swap (string_pool &other) |
| void | merge (string_pool &other) |
Implements string hash map.
| std::pair<pstring, bool> orcus::string_pool::intern | ( | const char * | str | ) |
Intern a string.
| str | string to intern. It must be null-terminated. |
| std::pair<pstring, bool> orcus::string_pool::intern | ( | const char * | str, |
| size_t | n | ||
| ) |
Intern a string.
| str | string to intern. It doesn't need to be null-terminated. |
| n | length of the string. |
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. |
1.8.14