Cafu Engine
cf::TypeSys::VarManT Class Reference

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
 
VarBaseTFind (const char *Name) const
 

Detailed Description

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.

See Also
TypeSys Variables Overview

Member Function Documentation

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.


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