![]() |
RobWorkProject
25.2.11-
|
The TypeRepository provides a repository in which types can be mapped to Type objects. More...
#include <TypeRepository.hpp>
Public Member Functions | |
template<class T > | |
Type | add () |
Adds a new Type to the repository for the template type T. More... | |
template<class T > | |
bool | has () |
Tests whether the template type T exists in the repository. | |
template<class T > | |
Type | get (bool addIfNotExisting=false, bool throwException=true) |
Returns the Type associated to the template type T. More... | |
Static Public Member Functions | |
static TypeRepository & | instance () |
Returns the global instance of the TypeRepository. More... | |
The TypeRepository provides a repository in which types can be mapped to Type objects.
Only one TypeRepository is allowed, hence it is implemented with a singleton pattern.
Notice that problems might occur if trying to use the TypeRepository with user defined type across dynamic linked libraries.
|
inline |
|
inline |
Returns the Type associated to the template type T.
With the get method is is possible to specify whether to add the type if it does not exists or whether to throw a rw::core::Exception. If the type if not defined and no exception is throw it returns Undefined.
|
static |
Returns the global instance of the TypeRepository.