Orocos Real-Time Toolkit
2.5.0
|
A class for representing a user type, and which can build instances of that type. More...
#include <rtt/types/TypeInfo.hpp>
Public Member Functions | |
virtual const std::string & | getTypeName () const =0 |
Return unique the type name. | |
virtual bool | installTypeInfoObject ()=0 |
Installs the type info object in the global data source type info handler. | |
Type building/factory functions | |
Used to create objects that hold data of a certain type. | |
virtual base::AttributeBase * | buildConstant (std::string name, base::DataSourceBase::shared_ptr, int sizehint) const |
Build a non modifyable instance of this type. | |
virtual base::AttributeBase * | buildConstant (std::string name, base::DataSourceBase::shared_ptr) const =0 |
Build a non modifyable instance of this type. | |
virtual base::AttributeBase * | buildVariable (std::string name, int sizehint) const |
Build a modifyable instance of this type. | |
virtual base::AttributeBase * | buildVariable (std::string name) const =0 |
Build a non modifyable instance of this type. | |
virtual bool | resize (base::DataSourceBase::shared_ptr arg, int size) const |
Tries to resize a data source in case it's a resizable sequence. | |
virtual base::DataSourceBase::shared_ptr | construct (const std::vector< base::DataSourceBase::shared_ptr > &args) const |
Constructor syntax: construct a internal::DataSource which returns an instance of data depending on the given arguments. | |
virtual base::DataSourceBase::shared_ptr | convert (base::DataSourceBase::shared_ptr arg) const |
Automatic conversion: convert a internal::DataSource to this type. | |
virtual void | addConstructor (TypeBuilder *tb) |
Add a constructor/convertor object. | |
virtual base::AttributeBase * | buildAlias (std::string name, base::DataSourceBase::shared_ptr b) const =0 |
build an alias with b as the value. | |
virtual base::PropertyBase * | buildProperty (const std::string &name, const std::string &desc, base::DataSourceBase::shared_ptr source=0) const =0 |
Build a Property of this type. | |
virtual base::AttributeBase * | buildAttribute (std::string name, base::DataSourceBase::shared_ptr source=0) const =0 |
Build an Attribute of this type. | |
virtual base::DataSourceBase::shared_ptr | buildValue () const =0 |
Build a internal::ValueDataSource of this type. | |
virtual base::DataSourceBase::shared_ptr | buildReference (void *ptr) const =0 |
Build a internal::ReferenceDataSource of this type, pointing to the given pointer. | |
virtual base::DataSourceBase::shared_ptr | buildActionAlias (base::ActionInterface *action, base::DataSourceBase::shared_ptr source) const =0 |
Returns a DataSource that first executes an action and returns the result of another data source. | |
Conversion to/from text | |
Used to convert data to human readable text and vice versa. | |
virtual std::ostream & | write (std::ostream &os, base::DataSourceBase::shared_ptr in) const =0 |
Output this datasource as a human readable string. | |
virtual std::istream & | read (std::istream &os, base::DataSourceBase::shared_ptr out) const =0 |
Read a new value for this datasource from a human readable string. | |
virtual std::string | toString (base::DataSourceBase::shared_ptr in) const |
Usability function which converts data to a string. | |
virtual bool | fromString (const std::string &value, base::DataSourceBase::shared_ptr out) const |
Usability function which converts a string to data. | |
virtual bool | isStreamable () const =0 |
Returns true if this type is directly streamable using read()/write() or toString()/fromString(). | |
Inspecting data structures. | |
Used to write a complex type to an external representation, like XML. | |
virtual std::vector< std::string > | getMemberNames () const |
Returns the list of struct member names of this type. | |
virtual base::DataSourceBase::shared_ptr | getMember (base::DataSourceBase::shared_ptr item, const std::string &name) const |
Returns a member of a given data source struct identified by its name. | |
virtual base::DataSourceBase::shared_ptr | getMember (base::DataSourceBase::shared_ptr item, base::DataSourceBase::shared_ptr id) const |
Returns a member of a given data source struct identified by a data source id. | |
virtual bool | composeType (base::DataSourceBase::shared_ptr source, base::DataSourceBase::shared_ptr target) const =0 |
Compose a type (target) from a DataSourceBase (source) containing its members. | |
virtual base::DataSourceBase::shared_ptr | decomposeType (base::DataSourceBase::shared_ptr source) const |
Specialize this function to return an alternate type which represents this one in a compatible way. | |
virtual base::DataSourceBase::shared_ptr | convertType (base::DataSourceBase::shared_ptr source) const |
Specialize this function to return an alternate type which represents this one in a compatible way. | |
Protected Types | |
typedef std::vector < TypeBuilder * > | Constructors |
typedef std::vector < TypeTransporter * > | Transporters |
Protected Attributes | |
Constructors | constructors |
Transporters | transporters |
Distribution of objects | |
typedef const std::type_info * | TypeId |
Register a protocol for data transport over a network. | |
bool | addProtocol (int protocol_id, TypeTransporter *tt) |
Register a protocol for data transport over a network. | |
TypeTransporter * | getProtocol (int protocol_id) const |
Returns this type's transport for a given protocol. | |
bool | hasProtocol (int protocol_id) const |
Check if this type is transporable over a given protocol. | |
std::vector< int > | getTransportNames () const |
Return a list of protocols that have transporters. | |
virtual TypeId | getTypeId () const =0 |
Register a protocol for data transport over a network. | |
virtual const char * | getTypeIdName () const =0 |
Register a protocol for data transport over a network. | |
virtual base::InputPortInterface * | inputPort (std::string const &name) const =0 |
Returns a new InputPort<T> object where T is the type represented by this TypeInfo object. | |
virtual base::OutputPortInterface * | outputPort (std::string const &name) const =0 |
Returns a new OutputPort<T> object where T is the type represented by this TypeInfo object. | |
virtual base::ChannelElementBase::shared_ptr | buildDataStorage (ConnPolicy const &policy) const =0 |
Creates single data or buffered storage for this type. | |
virtual base::ChannelElementBase::shared_ptr | buildChannelOutput (base::InputPortInterface &port) const =0 |
Register a protocol for data transport over a network. | |
virtual base::ChannelElementBase::shared_ptr | buildChannelInput (base::OutputPortInterface &port) const =0 |
Register a protocol for data transport over a network. | |
void | migrateProtocols (TypeInfo *orig) |
Migrates all protocols present in orig to this type info object. |
A class for representing a user type, and which can build instances of that type.
Definition at line 53 of file TypeInfo.hpp.
virtual base::DataSourceBase::shared_ptr RTT::types::TypeInfo::buildActionAlias | ( | base::ActionInterface * | action, |
base::DataSourceBase::shared_ptr | source | ||
) | const [pure virtual] |
Returns a DataSource that first executes an action and returns the result of another data source.
If source is an AssignableDataSource, an AssignableDataSource is returned of the same type, otherwise, a plain DataSource is returned.
Implemented in RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >, and RTT::types::EmptyTypeInfo.
Referenced by RTT::corba::CorbaOperationCallerFactory::produce().
virtual base::AttributeBase* RTT::types::TypeInfo::buildAlias | ( | std::string | name, |
base::DataSourceBase::shared_ptr | b | ||
) | const [pure virtual] |
build an alias with b as the value.
If b is of the wrong type, 0 will be returned..
Implemented in RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >, and RTT::types::EmptyTypeInfo.
AttributeBase * RTT::TypeInfo::buildConstant | ( | std::string | name, |
base::DataSourceBase::shared_ptr | dsb, | ||
int | sizehint | ||
) | const [virtual] |
Build a non modifyable instance of this type.
sizehint | For variable size instances, use it to hint the size of the instance. |
Definition at line 63 of file TypeInfo.cpp.
virtual base::AttributeBase* RTT::types::TypeInfo::buildConstant | ( | std::string | name, |
base::DataSourceBase::shared_ptr | |||
) | const [pure virtual] |
Build a non modifyable instance of this type.
sizehint | For variable size instances, use it to hint the size of the instance. |
Implemented in RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >, and RTT::types::EmptyTypeInfo.
virtual base::ChannelElementBase::shared_ptr RTT::types::TypeInfo::buildDataStorage | ( | ConnPolicy const & | policy | ) | const [pure virtual] |
Creates single data or buffered storage for this type.
policy | Describes the kind of storage requested by the user |
Implemented in RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >, RTT::types::EmptyTypeInfo, RTT::types::TemplateTypeInfo< T, use_ostream >, RTT::types::TemplateTypeInfo< T, has_ostream >, RTT::types::TemplateTypeInfo< rt_string, has_ostream >, RTT::types::TemplateTypeInfo< std::vector< T >, has_ostream >, RTT::types::TemplateTypeInfo< std::string, has_ostream >, RTT::types::TemplateTypeInfo< T, true >, RTT::types::TemplateTypeInfo< bool >, RTT::types::TemplateTypeInfo< std::vector< double >, has_ostream >, and RTT::types::TemplateTypeInfo< T, false >.
Referenced by RTT::corba::RemoteInputPort::buildRemoteChannelOutput().
AttributeBase * RTT::TypeInfo::buildVariable | ( | std::string | name, |
int | sizehint | ||
) | const [virtual] |
Build a modifyable instance of this type.
sizehint | For variable size instances, use it to hint the size of the instance. |
Reimplemented in RTT::types::CArrayTypeInfo< T, has_ostream >.
Definition at line 59 of file TypeInfo.cpp.
virtual base::AttributeBase* RTT::types::TypeInfo::buildVariable | ( | std::string | name | ) | const [pure virtual] |
Build a non modifyable instance of this type.
sizehint | For variable size instances, use it to hint the size of the instance. |
Implemented in RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >, and RTT::types::EmptyTypeInfo.
virtual bool RTT::types::TypeInfo::composeType | ( | base::DataSourceBase::shared_ptr | source, |
base::DataSourceBase::shared_ptr | target | ||
) | const [pure virtual] |
Compose a type (target) from a DataSourceBase (source) containing its members.
The default behavior tries to assign source to target. If that fails, it tries to decompose target into its members and update the members of target with the contents of source.
The default implementation in TemplateTypeInfo works for most types, but can be overridden in case there are multiple versions/possibilities to make a target from a source. For example, in order to support legacy formats or in order to do the inverse of decomposeType().
source | A data source of the same type as target OR a PropertyBag that contains the parts of target to be refreshed. |
target | A data source of the same type as this TypeInfo object which contains the data to be updated from source. |
Implemented in RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >, RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::EmptyTypeInfo, RTT::types::BoostArrayTypeInfo< T, has_ostream >, RTT::types::TemplateTypeInfo< T, use_ostream >, RTT::types::TemplateTypeInfo< T, has_ostream >, RTT::types::TemplateTypeInfo< rt_string, has_ostream >, RTT::types::TemplateTypeInfo< std::vector< T >, has_ostream >, RTT::types::TemplateTypeInfo< std::string, has_ostream >, RTT::types::TemplateTypeInfo< T, true >, RTT::types::TemplateTypeInfo< bool >, RTT::types::TemplateTypeInfo< std::vector< double >, has_ostream >, RTT::types::TemplateTypeInfo< T, false >, RTT::types::EnumTypeInfo< T >, RTT::types::StdStringTypeInfo, RTT::types::RTStringTypeInfo, RTT::types::StdTypeInfo< T >, RTT::types::StdVectorTypeInfo, RTT::types::PrimitiveSequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< rt_string, true >, RTT::types::SequenceTypeInfo< std::string, true >, RTT::types::SequenceTypeInfo< std::vector< double >, true >, RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >, and RTT::types::StdPrimitiveTypeInfo< T >.
Referenced by RTT::types::composePropertyBag(), and RTT::updateProperties().
DataSourceBase::shared_ptr RTT::TypeInfo::construct | ( | const std::vector< base::DataSourceBase::shared_ptr > & | args | ) | const [virtual] |
Constructor syntax: construct a internal::DataSource which returns an instance of data depending on the given arguments.
When args is empty, the default 'variable' is returned.
Reimplemented in RTT::types::EmptyTypeInfo.
Definition at line 79 of file TypeInfo.cpp.
References RTT::base::AttributeBase::getDataSource().
DataSourceBase::shared_ptr RTT::TypeInfo::convert | ( | base::DataSourceBase::shared_ptr | arg | ) | const [virtual] |
Automatic conversion: convert a internal::DataSource to this type.
For example, for converting float -> double. If no valid conversion was found, returns arg again, otherwise, a new data source.
Definition at line 110 of file TypeInfo.cpp.
Referenced by RTT::types::CArrayTypeInfo< T, has_ostream >::getMember(), RTT::internal::AssignableDataSource< T >::update(), and RTT::internal::AssignableDataSource< T >::updateAction().
base::DataSourceBase::shared_ptr RTT::TypeInfo::convertType | ( | base::DataSourceBase::shared_ptr | source | ) | const [virtual] |
Specialize this function to return an alternate type which represents this one in a compatible way.
For example, a short converts to an long or an enum to an int or a string.
Definition at line 134 of file TypeInfo.cpp.
base::DataSourceBase::shared_ptr RTT::TypeInfo::decomposeType | ( | base::DataSourceBase::shared_ptr | source | ) | const [virtual] |
Specialize this function to return an alternate type which represents this one in a compatible way.
For example, a short converts to an long or an enum to an int or a string. If your return a datasource containing a property bag, then this function should do the inverse of composeType: the returned property bag contains all parts of the current type (source) which can be modified and merged back into this type with composeType. Mathematically: composeType( decomposeType( A ), B); assert( A == B );
Reimplemented in RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >, RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::EmptyTypeInfo, RTT::types::BoostArrayTypeInfo< T, has_ostream >, RTT::types::EnumTypeInfo< T >, RTT::types::TemplateTypeInfo< T, use_ostream >, RTT::types::TemplateTypeInfo< T, has_ostream >, RTT::types::TemplateTypeInfo< rt_string, has_ostream >, RTT::types::TemplateTypeInfo< std::vector< T >, has_ostream >, RTT::types::TemplateTypeInfo< std::string, has_ostream >, RTT::types::TemplateTypeInfo< T, true >, RTT::types::TemplateTypeInfo< bool >, RTT::types::TemplateTypeInfo< std::vector< double >, has_ostream >, RTT::types::TemplateTypeInfo< T, false >, RTT::types::StdStringTypeInfo, RTT::types::RTStringTypeInfo, RTT::types::StdTypeInfo< T >, RTT::types::PrimitiveSequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< rt_string, true >, RTT::types::SequenceTypeInfo< std::string, true >, RTT::types::SequenceTypeInfo< std::vector< double >, true >, RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >, and RTT::types::StdPrimitiveTypeInfo< T >.
Definition at line 128 of file TypeInfo.cpp.
Referenced by RTT::base::PropertyBagVisitor::introspectAndDecompose().
DataSourceBase::shared_ptr RTT::TypeInfo::getMember | ( | base::DataSourceBase::shared_ptr | item, |
const std::string & | name | ||
) | const [virtual] |
Returns a member of a given data source struct identified by its name.
item | The item of which to return a reference to a member |
name | The name of a member within item. Is a name of a member in case of a struct or an index number in case of a sequence. |
** Strong typed data **
for( set i = 0; i <=10; set i = i + 1) { value[i] = i; // sequence index, runtime structure value.i = i; // part name, browse static structure } set frame.pos = vector(a,b,c); // getMember("pos") set frame.pos[3] = vector(a,b,c); // getMember("pos")->getMember(3) set frame[3].pos = vector(a,b,c); // getMember(3)->getMember("pos") set frame[i].pos = vector(a,b,c); // getMember( $i )->getMember("pos") set frame["tool"].pos = vector(a,b,c); // getMember("tool") xx set frame[arg].pos = vector(a,b,c);// getMember( arg )->getMember("pos")
Reimplemented in RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::BoostArrayTypeInfo< T, has_ostream >, and RTT::types::StructTypeInfo< T, has_ostream >.
Definition at line 230 of file TypeInfo.cpp.
Referenced by RTT::base::DataSourceBase::getMember().
DataSourceBase::shared_ptr RTT::TypeInfo::getMember | ( | base::DataSourceBase::shared_ptr | item, |
base::DataSourceBase::shared_ptr | id | ||
) | const [virtual] |
Returns a member of a given data source struct identified by a data source id.
item | The item of which to return a member |
id | Or a string data source containing the name of a member if item is a struct, Or an unsigned int data source containing the index of an element if item is a sequence |
** Strong typed data **
for( set i = 0; i <=10; set i = i + 1) { value[i] = i; // sequence index, runtime structure value.i = i; // part name, browse static structure } set frame.pos = vector(a,b,c); // getMember("pos") set frame.pos[3] = vector(a,b,c); // getMember("pos")->getMember(3) set frame[3].pos = vector(a,b,c); // getMember(3)->getMember("pos") set frame[i].pos = vector(a,b,c); // getMember( $i )->getMember("pos") set frame["tool"].pos = vector(a,b,c); // getMember("tool") xx set frame[arg].pos = vector(a,b,c);// getMember( arg )->getMember("pos")
Reimplemented in RTT::types::CArrayTypeInfo< T, has_ostream >, and RTT::types::BoostArrayTypeInfo< T, has_ostream >.
Definition at line 252 of file TypeInfo.cpp.
vector< string > RTT::TypeInfo::getMemberNames | ( | ) | const [virtual] |
Returns the list of struct member names of this type.
In case this type is not a struct, returns an empty list.
Reimplemented in RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::BoostArrayTypeInfo< T, has_ostream >, and RTT::types::StructTypeInfo< T, has_ostream >.
Definition at line 225 of file TypeInfo.cpp.
Referenced by RTT::base::DataSourceBase::getMemberNames().
TypeTransporter * RTT::TypeInfo::getProtocol | ( | int | protocol_id | ) | const |
Returns this type's transport for a given protocol.
Will print a warning when returning null. Use hasProtocol() to query without warning.
Definition at line 172 of file TypeInfo.cpp.
Referenced by RTT::corba::RemoteInputPort::buildRemoteChannelOutput(), RTT::internal::ConnFactory::createAndCheckStream(), RTT::corba::DataSourceProxy< T >::DataSourceProxy(), RTT::corba::CorbaOperationCallerFactory::produce(), RTT::corba::CorbaOperationCallerFactory::produceCollect(), and RTT::corba::CorbaOperationCallerFactory::produceSend().
virtual bool RTT::types::TypeInfo::installTypeInfoObject | ( | ) | [pure virtual] |
Installs the type info object in the global data source type info handler.
This will be called by the TypeInfoRepository, prior to registering this type. If installation fails the TypeInfoRepository will delete this object, and all its associated constructors.
true | installation succeeded. This object should not be deleted during the execution of the current process. |
false | installation failed. This object is not used and may be deleted. |
Implemented in RTT::types::TypeInfoName< T >, RTT::types::EmptyTypeInfo, RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, and RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >.
Referenced by RTT::types::TypeInfoRepository::addType().
void RTT::TypeInfo::migrateProtocols | ( | TypeInfo * | orig | ) | [protected] |
Migrates all protocols present in orig to this type info object.
It is meant as a helper when a type info object is replaced by a new instance.
Definition at line 190 of file TypeInfo.cpp.
Referenced by RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >::installTypeInfoObject(), and RTT::types::TypeInfoName< T >::installTypeInfoObject().
virtual std::istream& RTT::types::TypeInfo::read | ( | std::istream & | os, |
base::DataSourceBase::shared_ptr | out | ||
) | const [pure virtual] |
Read a new value for this datasource from a human readable string.
The default does nothing.
Implemented in RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >, RTT::types::EmptyTypeInfo, and RTT::types::BoolTypeInfo.
bool RTT::TypeInfo::resize | ( | base::DataSourceBase::shared_ptr | arg, |
int | size | ||
) | const [virtual] |
Tries to resize a data source in case it's a resizable sequence.
Definition at line 139 of file TypeInfo.cpp.
virtual std::ostream& RTT::types::TypeInfo::write | ( | std::ostream & | os, |
base::DataSourceBase::shared_ptr | in | ||
) | const [pure virtual] |
Output this datasource as a human readable string.
The default just writes the type name in parentheses to os.
Implemented in RTT::types::PrimitiveTypeInfo< T, use_ostream >, RTT::types::PrimitiveTypeInfo< T, has_ostream >, RTT::types::PrimitiveTypeInfo< rt_string, use_ostream >, RTT::types::PrimitiveTypeInfo< bool, false >, RTT::types::PrimitiveTypeInfo< std::vector< double >, use_ostream >, RTT::types::PrimitiveTypeInfo< T, true >, RTT::types::PrimitiveTypeInfo< std::string, use_ostream >, RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >, RTT::types::EmptyTypeInfo, and RTT::types::BoolTypeInfo.