alaCarte Maps
Renderer for OpenStreetMap tiles
|
Represents a string which is cached into an internal cache. More...
#include <cached_string.hpp>
Classes | |
class | StringStorage |
Storage class for cached strings. More... | |
struct | StringStorageElement |
Public Member Functions | |
CachedString () | |
Cretaes a new Cached string. More... | |
CachedString (const char *str) | |
Creates a new cached string from a char ptr. More... | |
CachedString (const string &str) | |
Creates a new cached string from a std string. More... | |
CachedString (const CachedString &other) | |
Creates a new cached string from another cached string. More... | |
~CachedString () | |
Tidies up the cached string. More... | |
CachedString & | operator= (const string &str) |
Assigns a std string. More... | |
CachedString & | operator= (const CachedString &other) |
Assigns a cached string. More... | |
bool | equals (const string &other) const |
Compares this cached string with an non cached string. More... | |
bool | equals (const CachedString &other) const |
Creates a new cached string from another cached string. More... | |
void | assign (const string &str) |
Assigns a std string. More... | |
void | assign (const CachedString &other) |
Assigns a cached string. More... | |
void | clear () |
Sets this string to the empty string. More... | |
const char * | c_str () const |
Returns the internal c string. More... | |
const string & | str () const |
Returns the internal string. More... | |
std::size_t | hash () const |
bool | operator< (const CachedString &other) const |
Static Public Member Functions | |
static void | Shutdown () |
Frees all internal memory used by the cache mechanism. More... | |
Private Member Functions | |
template<typename Archive > | |
void | save (Archive &ar, const unsigned int version) const |
template<class Archive > | |
void | load (Archive &ar, const unsigned int version) |
Private Attributes | |
const StringStorageElement * | internalString |
Friends | |
class | boost::serialization::access |
class | MaybeCachedString |
Represents a string which is cached into an internal cache.
It is not safe to use an instance of this class in more than one thread!!!
Definition at line 40 of file cached_string.hpp.
CachedString::CachedString | ( | ) |
Cretaes a new Cached string.
Definition at line 182 of file cached_string.cpp.
|
explicit |
Creates a new cached string from a char ptr.
Definition at line 191 of file cached_string.cpp.
|
explicit |
Creates a new cached string from a std string.
Definition at line 200 of file cached_string.cpp.
CachedString::CachedString | ( | const CachedString & | other | ) |
Creates a new cached string from another cached string.
Definition at line 209 of file cached_string.cpp.
CachedString::~CachedString | ( | ) |
Tidies up the cached string.
Definition at line 219 of file cached_string.cpp.
void CachedString::assign | ( | const string & | str | ) |
Assigns a std string.
Definition at line 272 of file cached_string.cpp.
void CachedString::assign | ( | const CachedString & | other | ) |
Assigns a cached string.
Definition at line 281 of file cached_string.cpp.
const char * CachedString::c_str | ( | ) | const |
Returns the internal c string.
Definition at line 301 of file cached_string.cpp.
void CachedString::clear | ( | ) |
Sets this string to the empty string.
Definition at line 291 of file cached_string.cpp.
bool CachedString::equals | ( | const string & | other | ) | const |
Compares this cached string with an non cached string.
Definition at line 227 of file cached_string.cpp.
bool CachedString::equals | ( | const CachedString & | other | ) | const |
Creates a new cached string from another cached string.
Definition at line 236 of file cached_string.cpp.
std::size_t CachedString::hash | ( | ) | const |
Definition at line 317 of file cached_string.cpp.
|
inlineprivate |
Definition at line 99 of file cached_string.hpp.
|
inline |
Definition at line 84 of file cached_string.hpp.
CachedString & CachedString::operator= | ( | const string & | str | ) |
Assigns a std string.
Definition at line 251 of file cached_string.cpp.
CachedString & CachedString::operator= | ( | const CachedString & | other | ) |
Assigns a cached string.
Definition at line 261 of file cached_string.cpp.
|
inlineprivate |
Definition at line 93 of file cached_string.hpp.
|
static |
Frees all internal memory used by the cache mechanism.
Definition at line 327 of file cached_string.cpp.
const string & CachedString::str | ( | ) | const |
Returns the internal string.
Definition at line 311 of file cached_string.cpp.
|
friend |
Definition at line 42 of file cached_string.hpp.
|
friend |
Definition at line 43 of file cached_string.hpp.
|
private |
Definition at line 108 of file cached_string.hpp.