Orocos Real-Time Toolkit
2.6.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 | addType (TypeInfoGenerator *tig) |
Add a type by using a type info generator. | |
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 55 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 (so use new()). It's name must be unique. |
Definition at line 124 of file TypeInfoRepository.cpp.
References RTT::types::TypeInfo::getTypeName().
bool RTT::TypeInfoRepository::addType | ( | TypeInfoGenerator * | tig | ) |
Add a type by using a type info generator.
This class is responsible for installing the TypeInfo object, registering the name and installing the necessary factories.
Definition at line 138 of file TypeInfoRepository.cpp.
References RTT::types::TypeInfo::addAlias(), RTT::types::TypeInfoGenerator::getTypeInfoObject(), RTT::types::TypeInfoGenerator::getTypeName(), and RTT::types::TypeInfoGenerator::installTypeInfoObject().
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 172 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.