xoreos  0.0.5
Public Member Functions | Private Types | Private Attributes | List of all members
Engines::TokenManager Class Reference

Manager for tokens in Aurora engines text strings. More...

#include <tokenman.h>

Inheritance diagram for Engines::TokenManager:
Inheritance graph
[legend]
Collaboration diagram for Engines::TokenManager:
Collaboration graph
[legend]

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::UStringTokenMap
 

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 ()
 

Detailed Description

Manager for tokens in Aurora engines text strings.

Definition at line 36 of file tokenman.h.

Member Typedef Documentation

◆ TokenMap

Definition at line 55 of file tokenman.h.

Constructor & Destructor Documentation

◆ TokenManager()

Engines::TokenManager::TokenManager ( )

Definition at line 31 of file tokenman.cpp.

◆ ~TokenManager()

Engines::TokenManager::~TokenManager ( )

Definition at line 34 of file tokenman.cpp.

Member Function Documentation

◆ clear()

void Engines::TokenManager::clear ( )

Clear all tokens.

Definition at line 37 of file tokenman.cpp.

References _tokens.

◆ parse() [1/2]

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().

Here is the call graph for this function:

◆ parse() [2/2]

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().

Here is the call graph for this function:

◆ remove()

void Engines::TokenManager::remove ( const Common::UString token)

Remove the value of a token.

Definition at line 45 of file tokenman.cpp.

References _tokens.

◆ set()

void Engines::TokenManager::set ( const Common::UString token,
const Common::UString value 
)

Set a value for a token.

Definition at line 41 of file tokenman.cpp.

References _tokens.

Member Data Documentation

◆ _tokens

TokenMap Engines::TokenManager::_tokens
private

Definition at line 57 of file tokenman.h.

Referenced by clear(), parse(), remove(), and set().


The documentation for this class was generated from the following files: