Orocos Real-Time Toolkit
2.5.0
|
This class contains all known types to Orocos. More...
#include <rtt/types/TypeInfoRepository.hpp>
Public Types | |
typedef boost::shared_ptr < TypeInfoRepository > | shared_ptr |
Public Member Functions | |
TypeInfo * | type (const std::string &name) const |
Retrieve a type with a given name. | |
bool | addType (TypeInfo *ti) |
Add a type to the Orocos type repository. | |
bool | aliasType (const std::string &alias, TypeInfo *source=0) |
Alias a type in the Orocos type repository with a new type info object. | |
std::vector< std::string > | getTypes () const |
List all types registered with their original type name. | |
std::vector< std::string > | getDottedTypes () const |
List all registered types in the package.type notation. | |
std::string | toDot (const std::string &type) const |
Convert any type name returned by getTypes() to the dotted type notation. | |
TypeInfo * | getTypeById (TypeInfo::TypeId type_id) const |
Return the type info structure of a given type by its type_id. | |
TypeInfo * | getTypeById (const char *type_id_name) const |
Return the type info structure of a given type name. | |
template<class T > | |
TypeInfo * | getTypeInfo () const |
Return the type info structure of a given type T. | |
void | registerTransport (TransportPlugin *tr) |
Call this function to add a new (network) transport for Orocos types. | |
void | logTypeInfo () const |
Dump all known types, along with transports and their types, to the log. | |
Static Public Member Functions | |
static shared_ptr | Instance () |
This class contains all known types to Orocos.
Definition at line 54 of file TypeInfoRepository.hpp.
bool RTT::TypeInfoRepository::addType | ( | TypeInfo * | ti | ) |
Add a type to the Orocos type repository.
ti | A type info object that becomes owned by the TypeInfoRepository. It's name must be unique. |
Definition at line 121 of file TypeInfoRepository.cpp.
References RTT::types::TypeInfo::getTypeName(), and RTT::types::TypeInfo::installTypeInfoObject().
bool RTT::TypeInfoRepository::aliasType | ( | const std::string & | alias, |
TypeInfo * | source = 0 |
||
) |
Alias a type in the Orocos type repository with a new type info object.
If alias has an existing type info object, it is deleted.
alias | The alias for source, i.e. when requesting the alias, the type info of source is returned. |
source | The type info that represents 'orig' and 'alias'. Note that this is not the same as using addType() above, you still need source to be added with addType(). |
Definition at line 140 of file TypeInfoRepository.cpp.
std::vector< std::string > RTT::TypeInfoRepository::getTypes | ( | ) | const |
List all types registered with their original type name.
See getDottedTypes for the typenames written in the 'package.type' notation.
Definition at line 153 of file TypeInfoRepository.cpp.
TypeInfo * RTT::TypeInfoRepository::type | ( | const std::string & | name | ) | const |
Retrieve a type with a given name.
name | The type name as specified by the TypeInfo object, or it's dotted equivalent. |
Definition at line 72 of file TypeInfoRepository.cpp.