|
The Vish Visualization Shell 0.3
Vish
|
Helper class for mapping C++ data types to objects. More...
#include <elementary/memcore/TypeInfo.hpp>
Public Member Functions | |
| const char * | name () const |
| Get the native C++ textual description of the certain type. | |
| const type_info & | operator() () const |
| Retrieve the native C++ type information via () operator. | |
| bool | operator< (const TypeInfo &T) const |
| The comparison operator. | |
| bool | operator== (const TypeInfo &T) const |
| The comparison operator. | |
| TypeInfo (const type_info &Id) | |
| Constructor. | |
| ~TypeInfo () | |
| Destructor. | |
Helper class for mapping C++ data types to objects.
TypeInfo is a reference wrapper class for the C++ native type_info class. It allows comparison using the C++ intrinsic type_info::before() function and is suitable as keys for a map template.
Usage especcially for constructing a maps between C++ data types to some type-specific objects:
map<TypeInfo, int> TypeMap; TypeMap[ typeid(int) ] = 45;