#include <TypeInfoRegistry.h>
An unique singleton to register all the type info defined in Sofa. More...
An unique singleton to register all the type info defined in Sofa.
AbstractTypeInfo offers an API to manipulate the data content of a specific type without requiring the inner details of the type. Have a look in AbstractTypeInfo for more information.
On its side, TypeInfoRegistry holds all the instances of object that inherits from AbstractTypeInfo
The common use case is get the type id to access a full AbstractTypeInfo from the TypeInfoRegistry. The access is done with a TypeInfoId instance that stores an unique identifier for each data type.
Example of use: TypeInfoId& shortinfo = TypeInfoId::GetTypeId<double>(); AbstractTypeInfo* info = TypeInfoRegistry::Get(shortinfo); info->getName()
Static Public Member Functions | |
static const AbstractTypeInfo * | Get (const TypeInfoId &id) |
static int | Set (const TypeInfoId &tid, AbstractTypeInfo *info, const std::string &compilationTarget) |
static std::vector< const AbstractTypeInfo * > | GetRegisteredTypes (const std::string &target="") |
static int | AllocateNewTypeId (const std::type_info &nfo) |
Returns a new int to generates the corresponding TypeInfoId. More... | |
|
static |
Returns a new int to generates the corresponding TypeInfoId.
|
static |
Returns the abstractTypeInfo corresponding to the provided TypeInfoId If there is none a NamedOnlyTypeInfo object is created an returned
|
static |
Returns a vector with all the AbstractTypeInfo that have been registered in the specified target. An empty target select everything that is in the registry.
|
static |
Register a new AbstractTypeInfo to the provided TypeInfoId. A Third parameter is used to provides the compilationTarget where the typeinfo is declared to ease the tracking of DataTypes.