![]() |
alaCarte Maps
Renderer for OpenStreetMap tiles
|
Storage class for cached strings. More...
Public Member Functions | |
| void | shutdown () |
| Frees all memory allocated by this storage. More... | |
| const StringStorageElement * | getEmptyString () const |
| Returns the storage element for an empty string. More... | |
| const StringStorageElement * | resolveString (const string &str) |
| Returns the storage element for a given string. More... | |
Static Public Member Functions | |
| static StringStorage & | Inst () |
| Returns the Storage. More... | |
Private Member Functions | |
| StringStorage () | |
| Creates the StringStorage. More... | |
Private Attributes | |
| StringStorageElement::Hasher | stringStorageElementHasher |
| The hasher used for StringStorageELements. More... | |
| StringStorageElement::StringComparator | stringComperator |
| The comparator for strings and storage elements. More... | |
| const StringStorageElement * | emptyString |
| Pointer to the storage element holding the empty string. More... | |
| boost::unordered_set< StringStorageElement, StringStorageElement::Hasher > | storage |
| internal storage as an hash map More... | |
| boost::shared_mutex | accessMutex |
| The mutex used to lock this class. More... | |
Storage class for cached strings.
This is an singleton
Definition at line 96 of file cached_string.cpp.
|
inlineprivate |
Creates the StringStorage.
Definition at line 157 of file cached_string.cpp.
|
inline |
Returns the storage element for an empty string.
Definition at line 126 of file cached_string.cpp.
|
inlinestatic |
Returns the Storage.
If no storage exists a new one will be created once!
Definition at line 106 of file cached_string.cpp.
|
inline |
Returns the storage element for a given string.
If no element exists for the string a new element is created.
Definition at line 137 of file cached_string.cpp.
|
inline |
Frees all memory allocated by this storage.
Definition at line 116 of file cached_string.cpp.
|
private |
The mutex used to lock this class.
Definition at line 173 of file cached_string.cpp.
|
private |
Pointer to the storage element holding the empty string.
Definition at line 169 of file cached_string.cpp.
|
private |
internal storage as an hash map
Definition at line 171 of file cached_string.cpp.
|
private |
The comparator for strings and storage elements.
Definition at line 166 of file cached_string.cpp.
|
private |
The hasher used for StringStorageELements.
Definition at line 164 of file cached_string.cpp.