zeus::TVariableResolver Class Reference

#include <VariableResolver.h>

Inheritance diagram for zeus::TVariableResolver:

zeus::TZObject zeus::IZUnknown

List of all members.

Public Member Functions

 TVariableResolver ()
void addVariable (const IString &rName, const IString &rValue)
void addVariable (const TString &rName, const TString &rValue)
void removeVariable (const IString &rName)
void removeVariable (const TString &rName)
TString resolve (const IString &rData, bool bRecusrive=false)
TString resolve (const TString &rData, bool bRecusrive=false)
void resolveDependancies (const IString &rData, TSet< TString > &rDependancies, bool bRecusrive=false)
void resolveDependancies (const TString &rData, TSet< TString > &rDependancies, bool bRecusrive=false)

Protected Member Functions

virtual ~TVariableResolver ()
virtual Retval resolveVariable (const TString &rName, TString &rValue)
virtual TString resolve_internal (const IString &rData, bool bRecursive, TSet< TString > &rReplacedVars)


Detailed Description

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.

Constructor & Destructor Documentation

TVariableResolver::TVariableResolver (  ) 

creates an abstract variable resolver

TVariableResolver::~TVariableResolver (  )  [protected, virtual]

destroys the abstract variable resolver


Member Function Documentation

void zeus::TVariableResolver::addVariable ( const IString rName,
const IString rValue 
) [inline]

adds a new variable or overwrites an existing variable

void zeus::TVariableResolver::addVariable ( const TString rName,
const TString rValue 
) [inline]

adds a new variable or overwrites an existing variable

void zeus::TVariableResolver::removeVariable ( const IString rName  )  [inline]

removes a variable

void zeus::TVariableResolver::removeVariable ( const TString rName  )  [inline]

removes a variable

TString zeus::TVariableResolver::resolve ( const IString rData,
bool  bRecusrive = false 
) [inline]

Resolves all variables of a string

TString zeus::TVariableResolver::resolve ( const TString rData,
bool  bRecusrive = false 
) [inline]

Resolves all variables of a string

void TVariableResolver::resolveDependancies ( const IString rData,
TSet< TString > &  rDependancies,
bool  bRecusrive = false 
)

Resolves all dependancies

rDependancies.hasItem(strRealVarName)

strVarName.isEmpty()

void zeus::TVariableResolver::resolveDependancies ( const TString rData,
TSet< TString > &  rDependancies,
bool  bRecusrive = false 
) [inline]

Resolves all dependancies

Retval TVariableResolver::resolveVariable ( const TString rName,
TString rValue 
) [protected, virtual]

This method implements the resolving of a variable and returns the concrete value

TString TVariableResolver::resolve_internal ( const IString rData,
bool  bRecursive,
TSet< TString > &  rReplacedVars 
) [protected, virtual]

Checks if the string contains variables and tries to resolve them

mapVars.hasItem(strVarName)

strVarName.isEmpty()


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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:36 2009