Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
RTT::types::TypeInfoRepository Class Reference

#include <TypeInfoRepository.hpp>

Public Types

typedef boost::shared_ptr< TypeInfoRepositoryshared_ptr

Public Member Functions

bool addType (TypeInfo *ti)
bool addType (TypeInfoGenerator *tig)
std::vector< std::string > getDottedTypes () const
TypeInfogetTypeById (TypeInfo::TypeId type_id) const
TypeInfogetTypeById (const char *type_id_name) const
template<class T >
TypeInfogetTypeInfo () const
std::vector< std::string > getTypes () const
void logTypeInfo () const
void registerTransport (TransportPlugin *tr)
void setAutoLoader (const boost::function< bool(const std::string &)> &loader)
std::string toDot (const std::string &type) const
TypeInfotype (const std::string &name) const
 ~TypeInfoRepository ()

Static Public Member Functions

static shared_ptr Instance ()
static void Release ()

Private Types

typedef std::map< std::string, TypeInfo * > map_t
typedef std::vector< TransportPlugin * > Transports

Private Member Functions

 TypeInfoRepository ()
TypeInfotypeInternal (const std::string &name) const

Private Attributes

map_t data
boost::function< bool(const std::string &)> loadTypeKitForName
Transports transports
os::Mutex type_lock

Detailed Description

This class contains all known types to Orocos.

See also
TemplateTypeInfo to add your own classes to Orocos.

Definition at line 56 of file TypeInfoRepository.hpp.

Member Typedef Documentation

typedef std::map<std::string, TypeInfo*> RTT::types::TypeInfoRepository::map_t

Definition at line 59 of file TypeInfoRepository.hpp.

Definition at line 71 of file TypeInfoRepository.hpp.

Definition at line 62 of file TypeInfoRepository.hpp.

Constructor & Destructor Documentation

RTT::TypeInfoRepository::TypeInfoRepository ( )

Definition at line 59 of file TypeInfoRepository.cpp.

RTT::TypeInfoRepository::~TypeInfoRepository ( )

Definition at line 126 of file TypeInfoRepository.cpp.

Member Function Documentation

bool RTT::TypeInfoRepository::addType ( TypeInfo ti)

Add a type to the Orocos type repository.

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

Definition at line 163 of file TypeInfoRepository.cpp.

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 177 of file TypeInfoRepository.cpp.

std::vector< std::string > RTT::TypeInfoRepository::getDottedTypes ( ) const

List all registered types in the package.type notation.

Definition at line 228 of file TypeInfoRepository.cpp.

TypeInfo * RTT::TypeInfoRepository::getTypeById ( TypeInfo::TypeId  type_id) const

Return the type info structure of a given type by its type_id.

Definition at line 139 of file TypeInfoRepository.cpp.

TypeInfo * RTT::TypeInfoRepository::getTypeById ( const char *  type_id_name) const

Return the type info structure of a given type name.

Definition at line 152 of file TypeInfoRepository.cpp.

template<class T >
TypeInfo* RTT::types::TypeInfoRepository::getTypeInfo ( ) const

Return the type info structure of a given type T.

Definition at line 133 of file TypeInfoRepository.hpp.

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 211 of file TypeInfoRepository.cpp.

boost::shared_ptr< TypeInfoRepository > RTT::TypeInfoRepository::Instance ( )

Definition at line 63 of file TypeInfoRepository.cpp.

void RTT::TypeInfoRepository::logTypeInfo ( ) const

Dump all known types, along with transports and their types, to the log.

Definition at line 252 of file TypeInfoRepository.cpp.

void RTT::TypeInfoRepository::registerTransport ( TransportPlugin tr)

Call this function to add a new (network) transport for Orocos types.

Definition at line 237 of file TypeInfoRepository.cpp.

void RTT::TypeInfoRepository::Release ( )

Definition at line 72 of file TypeInfoRepository.cpp.

void RTT::TypeInfoRepository::setAutoLoader ( const boost::function< bool(const std::string &)> &  loader)

Definition at line 76 of file TypeInfoRepository.cpp.

string RTT::TypeInfoRepository::toDot ( const std::string &  type) const

Convert any type name returned by getTypes() to the dotted type notation.

Definition at line 217 of file TypeInfoRepository.cpp.

TypeInfo * RTT::TypeInfoRepository::type ( const std::string &  name) const

Retrieve a type with a given name.

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

Definition at line 113 of file TypeInfoRepository.cpp.

TypeInfo * RTT::TypeInfoRepository::typeInternal ( const std::string &  name) const

Definition at line 81 of file TypeInfoRepository.cpp.

Member Data Documentation

map_t RTT::types::TypeInfoRepository::data

Definition at line 60 of file TypeInfoRepository.hpp.

boost::function<bool (const std::string &)> RTT::types::TypeInfoRepository::loadTypeKitForName

Definition at line 66 of file TypeInfoRepository.hpp.

Transports RTT::types::TypeInfoRepository::transports

Definition at line 63 of file TypeInfoRepository.hpp.

os::Mutex RTT::types::TypeInfoRepository::type_lock

Definition at line 64 of file TypeInfoRepository.hpp.

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

Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:47