Orocos Real-Time Toolkit  2.5.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 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.
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 54 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. 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 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.

Parameters:
aliasThe alias for source, i.e. when requesting the alias, the type info of source is returned.
sourceThe 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().
Returns:
false if source is null.

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.

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: