xoreos
0.0.5
|
Manager for tokens in Aurora engines text strings. More...
#include <tokenman.h>
Public Member Functions | |
TokenManager () | |
~TokenManager () | |
void | clear () |
Clear all tokens. More... | |
void | set (const Common::UString &token, const Common::UString &value) |
Set a value for a token. More... | |
void | remove (const Common::UString &token) |
Remove the value of a token. More... | |
void | parse (Common::UString &str) const |
Parse a string for tokens, replacing them with their values. More... | |
Common::UString | parse (const Common::UString &str) const |
Parse a string for tokens, replacing them with their values. More... | |
Private Types | |
typedef std::map< Common::UString, Common::UString > | TokenMap |
Private Attributes | |
TokenMap | _tokens |
Additional Inherited Members | |
Static Public Member Functions inherited from Common::Singleton< TokenManager > | |
static TokenManager & | instance () |
static void | destroy () |
Protected Types inherited from Common::Singleton< TokenManager > | |
typedef TokenManager | SingletonBaseType |
Protected Member Functions inherited from Common::Singleton< TokenManager > | |
Singleton () | |
virtual | ~Singleton () |
Manager for tokens in Aurora engines text strings.
Definition at line 36 of file tokenman.h.
|
private |
Definition at line 55 of file tokenman.h.
Engines::TokenManager::TokenManager | ( | ) |
Definition at line 31 of file tokenman.cpp.
Engines::TokenManager::~TokenManager | ( | ) |
Definition at line 34 of file tokenman.cpp.
void Engines::TokenManager::clear | ( | ) |
void Engines::TokenManager::parse | ( | Common::UString & | str | ) | const |
Parse a string for tokens, replacing them with their values.
Definition at line 53 of file tokenman.cpp.
References Common::UString::swap().
Common::UString Engines::TokenManager::parse | ( | const Common::UString & | str | ) | const |
Parse a string for tokens, replacing them with their values.
Definition at line 59 of file tokenman.cpp.
References _tokens, and Common::UString::splitTextTokens().
void Engines::TokenManager::remove | ( | const Common::UString & | token | ) |
void Engines::TokenManager::set | ( | const Common::UString & | token, |
const Common::UString & | value | ||
) |
|
private |