This class is a simple container for pointers to VarBaseTs. More...
#include "Variables.hpp"
Classes | |
struct | CompareCStr |
Public Types | |
typedef std::map< const char *, VarBaseT *, CompareCStr > | MapVarBaseT |
Public Member Functions | |
void | Add (VarBaseT *Var) |
void | AddAlias (const char *Alias, VarBaseT *Var) |
Adds an alias name for the given variable so that a call to Find() will also find the variable under the alias name. More... | |
const ArrayT< VarBaseT * > & | GetArray () const |
VarBaseT * | Find (const char *Name) const |
This class is a simple container for pointers to VarBaseTs.
Together with the VarT classes, it provides a very simple kind of "reflection" or "type introspection" feature. See class ComponentBaseT for an example use.
void cf::TypeSys::VarManT::AddAlias | ( | const char * | Alias, |
VarBaseT * | Var | ||
) |
Adds an alias name for the given variable so that a call to Find() will also find the variable under the alias name.
The purpose of this method is to provide backwards-compatibility if variables must be renamed after they have been introduced and became widely used, e.g. in custom user scripts.