Orocos Real-Time Toolkit  2.6.0
Public Types | Public Member Functions | Static Public Member Functions
RTT::types::TypeInfoRepository Class Reference

This class contains all known types to Orocos. More...

#include <rtt/types/TypeInfoRepository.hpp>

List of all members.

Public Types

typedef boost::shared_ptr
< TypeInfoRepository
shared_ptr

Public Member Functions

TypeInfotype (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.
TypeInfogetTypeById (TypeInfo::TypeId type_id) const
 Return the type info structure of a given type by its type_id.
TypeInfogetTypeById (const char *type_id_name) const
 Return the type info structure of a given type name.
template<class T >
TypeInfogetTypeInfo () 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 ()

Detailed Description

This class contains all known types to Orocos.

See also:
TemplateTypeInfo to add your own classes to Orocos.

Definition at line 55 of file TypeInfoRepository.hpp.


Member Function Documentation

Add a type to the Orocos type repository.

Parameters:
tiA type info object that becomes owned by the TypeInfoRepository (so use new()). It's name must be unique.
Returns:
false if ti was already added or if ti->getTypeName() already exists in this repository.

Definition at line 124 of file TypeInfoRepository.cpp.

References RTT::types::TypeInfo::getTypeName().

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.

Parameters:
nameThe type name as specified by the TypeInfo object, or it's dotted equivalent.

Definition at line 72 of file TypeInfoRepository.cpp.


The documentation for this class was generated from the following files: