Orocos Real-Time Toolkit  2.8.3
Public Member Functions | Protected Attributes | List of all members
RTT::types::TypeInfoName< T > Struct Template Reference

This helper class allows only type names to be added to Orocos. More...

#include <rtt/types/rtt-types-fwd.hpp>

Inheritance diagram for RTT::types::TypeInfoName< T >:
RTT::types::EmptyTypeInfo RTT::types::TypeInfoGenerator

Public Member Functions

 TypeInfoName (std::string name)
 Setup Type Name Information for type name. More...
 
bool installTypeInfoObject (TypeInfo *ti)
 Installs the type info object in the global data source type info handler and adds any additional features to the type info object. More...
 
TypeInfogetTypeInfoObject () const
 Returns the TypeInfo object of this type, or null if none exists yet. More...
 
virtual const std::string & getTypeName () const
 Return the type name for which this generator generates type info features. More...
 

Protected Attributes

const std::string tname
 

Detailed Description

template<typename T>
struct RTT::types::TypeInfoName< T >

This helper class allows only type names to be added to Orocos.

Warning
OR use this class OR use TemplateTypeInfo to describe your type, not both.
See also
TemplateTypeInfo for adding full type info to Orocos.

Definition at line 39 of file rtt-types-fwd.hpp.

Constructor & Destructor Documentation

template<typename T >
RTT::types::TypeInfoName< T >::TypeInfoName ( std::string  name)
inline

Setup Type Name Information for type name.

This causes a switch from 'unknown' type to basic type information for type T.

Parameters
namethe 'Orocos' type name.

Definition at line 91 of file TypeInfoName.hpp.

Member Function Documentation

template<typename T >
TypeInfo* RTT::types::TypeInfoName< T >::getTypeInfoObject ( ) const
inlinevirtual

Returns the TypeInfo object of this type, or null if none exists yet.

Returns
All generators should return here TypeInfoRepository::Instance()->getTypeInfo<T>();

Reimplemented from RTT::types::EmptyTypeInfo.

Definition at line 101 of file TypeInfoName.hpp.

References RTT::types::TypeInfoRepository::Instance().

virtual const std::string& RTT::types::EmptyTypeInfo::getTypeName ( ) const
inlinevirtualinherited

Return the type name for which this generator generates type info features.

This name will be aliased by the TypeInfo object.

Implements RTT::types::TypeInfoGenerator.

Definition at line 69 of file TypeInfoName.hpp.

template<typename T >
bool RTT::types::TypeInfoName< T >::installTypeInfoObject ( TypeInfo ti)
inlinevirtual

Installs the type info object in the global data source type info handler and adds any additional features to the type info object.

This method will be called by the TypeInfoRepository, in order to register this type's factories into the TypeInfo object.

Parameters
tiA valid TypeInfo object into which new features may be installed
Returns
true if this object may be deleted, false if not.
Postcondition
When true is returned, this instance is still valid and the caller (TypeInfoRepository) will delete it. When false is returned, the validity is undefined and the instance will not be used anymore by the caller.

Reimplemented from RTT::types::EmptyTypeInfo.

Definition at line 96 of file TypeInfoName.hpp.

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

Member Data Documentation

const std::string RTT::types::EmptyTypeInfo::tname
protectedinherited

Definition at line 58 of file TypeInfoName.hpp.


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