ZeusBase-Library
2.0.4
|
#include <VariableResolver.h>
Public Member Functions | |
TVariableResolver () | |
virtual void MQUALIFIER | clearVariables () |
virtual void MQUALIFIER | addVariable (const IString &rName, const IString &rValue) |
virtual void MQUALIFIER | removeVariable (const IString &rName) |
virtual Retval MQUALIFIER | resolve (const IString &rData, IString &rOut, bool bRecursive) |
virtual Retval MQUALIFIER | askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface) |
virtual void MQUALIFIER | addRef () const |
virtual void MQUALIFIER | release () const |
void | addVariables (const TStringMap< TString > &rVariables) |
void | addVariable (const TString &rName, const TString &rValue) |
void | removeVariables (const TStringMap< TString > &rVariables) |
void | removeVariables (const TSet< TString > &rVariables) |
void | removeVariable (const TString &rName) |
Retval | resolve (const TString &rData, IString &rOut, bool bRecursive) |
void | resolveDependancies (const IString &rData, TSet< TString > &rDependancies, bool bRecusrive=false) |
void | resolveDependancies (const TString &rData, TSet< TString > &rDependancies, bool bRecusrive=false) |
Public Member Functions inherited from zeus::TZObject | |
TZObject () | |
TZObject (const TString &strName) | |
TZObject (const IString &strName) | |
Uint | getHash () const |
TString | toString () const |
virtual TString | getObjName () const |
virtual void | setObjName (const TString &name) |
Protected Member Functions | |
virtual | ~TVariableResolver () |
virtual Retval | resolveVariable (const TString &rName, TString &rValue) |
virtual Retval | resolve_internal (const IString &rData, IString &rOut, bool bRecursive, TSet< TString > &rReplacedVars) |
Protected Member Functions inherited from zeus::TZObject | |
virtual | ~TZObject () |
TZObject (const TZObject &rObject) | |
TZObject & | operator= (const TZObject &rObject) |
Int | getRefCounter () const |
Additional Inherited Members | |
Protected Attributes inherited from zeus::TZObject | |
Uint | m_uiID |
This class is used to resolve variable notations inside a string. A variable notation must have the syntax of . This class must be inherited by concrete variable solvers searching and resolving the variables in a defined domain.
TVariableResolver::TVariableResolver | ( | ) |
creates an abstract variable resolver
|
protectedvirtual |
destroys the abstract variable resolver
|
virtual |
Reimplemented from zeus::TZObject.
|
inlinevirtual |
Implements zeus::IVariableResolver.
adds a new variable or overwrites an existing variable
void TVariableResolver::addVariables | ( | const TStringMap< TString > & | rVariables | ) |
Adds all variables of a variable map
|
virtual |
Reimplemented from zeus::TZObject.
|
inlinevirtual |
Implements zeus::IVariableResolver.
|
virtual |
Reimplemented from zeus::TZObject.
|
inlinevirtual |
Implements zeus::IVariableResolver.
|
inline |
removes a variable
void TVariableResolver::removeVariables | ( | const TStringMap< TString > & | rVariables | ) |
Removes all variables of a variable map
Removes all variables of a variable set
|
inlinevirtual |
Implements zeus::IVariableResolver.
|
inline |
Resolves all variables of a string
|
protectedvirtual |
Checks if the string contains variables and tries to resolve them
mapVars.hasItem(strVarName)
strVarName.isEmpty()
void TVariableResolver::resolveDependancies | ( | const IString & | rData, |
TSet< TString > & | rDependancies, | ||
bool | bRecusrive = false |
||
) |
Resolves all dependancies
rDependancies.hasItem(strRealVarName)
strVarName.isEmpty()
|
inline |
Resolves all dependancies
|
protectedvirtual |
This method implements the resolving of a variable and returns the concrete value
Reimplemented in zeus::TSettingsVariableResolver.