Orocos Real-Time Toolkit
2.9.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 | |
~TypeInfoRepository () | |
void | setAutoLoader (const boost::function< bool(const std::string &)> &loader) |
TypeInfo * | type (const std::string &name) const |
Retrieve a type with a given name. More... | |
bool | addType (TypeInfo *ti) |
Add a type to the Orocos type repository. More... | |
bool | addType (TypeInfoGenerator *tig) |
Add a type by using a type info generator. More... | |
std::vector< std::string > | getTypes () const |
List all types registered with their original type name. More... | |
std::vector< std::string > | getDottedTypes () const |
List all registered types in the package.type notation. More... | |
std::string | toDot (const std::string &type) const |
Convert any type name returned by getTypes() to the dotted type notation. More... | |
TypeInfo * | getTypeById (TypeInfo::TypeId type_id) const |
Return the type info structure of a given type by its type_id. More... | |
TypeInfo * | getTypeById (const char *type_id_name) const |
Return the type info structure of a given type name. More... | |
template<class T > | |
TypeInfo * | getTypeInfo () const |
Return the type info structure of a given type T. More... | |
void | registerTransport (TransportPlugin *tr) |
Call this function to add a new (network) transport for Orocos types. More... | |
void | logTypeInfo () const |
Dump all known types, along with transports and their types, to the log. More... | |
Static Public Member Functions | |
static shared_ptr | Instance () |
static void | Release () |
This class contains all known types to Orocos.
Definition at line 56 of file TypeInfoRepository.hpp.
typedef boost::shared_ptr<TypeInfoRepository> RTT::types::TypeInfoRepository::shared_ptr |
Definition at line 71 of file TypeInfoRepository.hpp.
RTT::TypeInfoRepository::~TypeInfoRepository | ( | ) |
Definition at line 126 of file TypeInfoRepository.cpp.
References RTT::internal::values().
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 163 of file TypeInfoRepository.cpp.
References RTT::Error, and 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 177 of file TypeInfoRepository.cpp.
References RTT::types::TypeInfo::addAlias(), RTT::Debug, RTT::Logger::endl(), RTT::Error, RTT::types::TypeInfoGenerator::getTypeInfoObject(), RTT::types::TypeInfoGenerator::getTypeName(), RTT::Info, and RTT::types::TypeInfoGenerator::installTypeInfoObject().
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.
References RTT::internal::keys().
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.
|
inline |
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.
References RTT::internal::keys().
|
static |
Definition at line 63 of file TypeInfoRepository.cpp.
Referenced by RTT::internal::DataSourceTypeInfo< T * >::getTypeInfo(), RTT::internal::DataSourceTypeInfo< types::carray< T > >::getTypeInfo(), RTT::internal::DataSourceTypeInfo< T >::getTypeInfo(), RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >::getTypeInfoObject(), RTT::types::TypeInfoName< T >::getTypeInfoObject(), RTT::types::TypekitRepository::Import(), RTT::types::RealTimeTypekitPlugin::loadConstructors(), RTT::types::RealTimeTypekitPlugin::loadTypes(), RTT::scripting::ProgramGraphParser::parserUsed(), RTT::scripting::ConstructorParser::seen_constructor(), RTT::corba::TaskContextProxy::synchronizePorts(), RTT::corba::TaskContextProxy::synchronizeServices(), and RTT::types::Types().
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.
References RTT::Debug, RTT::Logger::endl(), and RTT::Logger::log().
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.
References RTT::Debug, RTT::types::TransportPlugin::getTransportName(), RTT::Info, and RTT::types::TransportPlugin::registerTransport().
|
static |
Definition at line 72 of file TypeInfoRepository.cpp.
Referenced by __os_exit().
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.
name | The type name as specified by the TypeInfo object, or it's dotted equivalent. |
Definition at line 113 of file TypeInfoRepository.cpp.