#include <PrimitiveTypeInfo.hpp>
Public Types | |
typedef T | DataType |
Public Member Functions | |
virtual bool | composeType (base::DataSourceBase::shared_ptr source, base::DataSourceBase::shared_ptr result) const |
virtual base::DataSourceBase::shared_ptr | decomposeType (base::DataSourceBase::shared_ptr source) const |
virtual bool | decomposeType (base::DataSourceBase::shared_ptr source, PropertyBag &targetbag) const |
boost::shared_ptr < PrimitiveTypeInfo< T, use_ostream > > | getSharedPtr () |
TypeInfo * | getTypeInfoObject () const |
virtual const std::string & | getTypeName () const |
bool | installTypeInfoObject (TypeInfo *ti) |
virtual bool | isStreamable () const |
PrimitiveTypeInfo (std::string name) | |
virtual std::istream & | read (std::istream &os, base::DataSourceBase::shared_ptr out) const |
virtual std::ostream & | write (std::ostream &os, base::DataSourceBase::shared_ptr in) const |
virtual | ~PrimitiveTypeInfo () |
Protected Attributes | |
boost::shared_ptr < PrimitiveTypeInfo< T, use_ostream > > | mshared |
const std::string | tname |
This template class allows primitive types, which are not sent over ports, to be added to Orocos. The type is known to the type system, but you can not use it in flow ports.
T | The user class type. |
use_ostream | When set to true, the class will use operator<<(std::ostream&, T) to write out the type to a stream. When set to false, the class will use this function and write '( type name )' to a stream instead. Defaults to false. Set to true if your class T has the above mentioned function. |
Definition at line 32 of file PrimitiveTypeInfo.hpp.
typedef T RTT::types::PrimitiveTypeInfo< T, use_ostream >::DataType |
The given T parameter is the type of the DataSources.
Reimplemented from RTT::types::TemplateValueFactory< T >.
Definition at line 44 of file PrimitiveTypeInfo.hpp.
RTT::types::PrimitiveTypeInfo< T, use_ostream >::PrimitiveTypeInfo | ( | std::string | name | ) | [inline] |
Setup Type Information for type name. This causes a switch from 'unknown' type to basic type information for type T.
name | the 'Orocos' type name. |
Definition at line 53 of file PrimitiveTypeInfo.hpp.
virtual RTT::types::PrimitiveTypeInfo< T, use_ostream >::~PrimitiveTypeInfo | ( | ) | [inline, virtual] |
Definition at line 58 of file PrimitiveTypeInfo.hpp.
virtual bool RTT::types::PrimitiveTypeInfo< T, use_ostream >::composeType | ( | base::DataSourceBase::shared_ptr | source, |
base::DataSourceBase::shared_ptr | result | ||
) | const [inline, virtual] |
Reimplemented in RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::BoostArrayTypeInfo< T, has_ostream >, RTT::types::EnumTypeInfo< T >, RTT::types::StdStringTypeInfo, RTT::types::RTStringTypeInfo, RTT::types::StdTypeInfo< T >, RTT::types::StdVectorTemplateTypeInfo< T, has_ostream >, RTT::types::StdTypeInfo< bool >, 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 >, and RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >.
Definition at line 111 of file PrimitiveTypeInfo.hpp.
virtual base::DataSourceBase::shared_ptr RTT::types::PrimitiveTypeInfo< T, use_ostream >::decomposeType | ( | base::DataSourceBase::shared_ptr | source | ) | const [inline, virtual] |
A primitive type is decomposed into itself.
Reimplemented in RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::BoostArrayTypeInfo< T, has_ostream >, RTT::types::EnumTypeInfo< T >, RTT::types::StdStringTypeInfo, RTT::types::RTStringTypeInfo, RTT::types::StdTypeInfo< T >, RTT::types::StdTypeInfo< bool >, 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 >, and RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >.
Definition at line 118 of file PrimitiveTypeInfo.hpp.
virtual bool RTT::types::PrimitiveTypeInfo< T, use_ostream >::decomposeType | ( | base::DataSourceBase::shared_ptr | source, |
PropertyBag & | targetbag | ||
) | const [inline, virtual] |
Definition at line 123 of file PrimitiveTypeInfo.hpp.
boost::shared_ptr<PrimitiveTypeInfo<T, use_ostream> > RTT::types::PrimitiveTypeInfo< T, use_ostream >::getSharedPtr | ( | ) | [inline] |
Definition at line 62 of file PrimitiveTypeInfo.hpp.
TypeInfo* RTT::types::PrimitiveTypeInfo< T, use_ostream >::getTypeInfoObject | ( | ) | const [inline, virtual] |
Returns the TypeInfo object of this type, or null if none exists yet.
Implements RTT::types::TypeInfoGenerator.
Definition at line 84 of file PrimitiveTypeInfo.hpp.
virtual const std::string& RTT::types::PrimitiveTypeInfo< T, use_ostream >::getTypeName | ( | ) | const [inline, virtual] |
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 88 of file PrimitiveTypeInfo.hpp.
bool RTT::types::PrimitiveTypeInfo< T, use_ostream >::installTypeInfoObject | ( | TypeInfo * | ti | ) | [inline, virtual] |
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.
Implements RTT::types::TypeInfoGenerator.
Reimplemented in 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< bool, true >, RTT::types::TemplateTypeInfo< std::string, has_ostream >, RTT::types::TemplateTypeInfo< T, true >, RTT::types::TemplateTypeInfo< std::vector< double >, has_ostream >, RTT::types::TemplateTypeInfo< T, false >, RTT::types::MatrixTypeInfo< T, has_ostream >, RTT::types::BoostArrayTypeInfo< T, has_ostream >, RTT::types::EnumTypeInfo< T >, RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::StructTypeInfo< T, has_ostream >, 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 >, and RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >.
Definition at line 68 of file PrimitiveTypeInfo.hpp.
virtual bool RTT::types::PrimitiveTypeInfo< T, use_ostream >::isStreamable | ( | ) | const [inline, virtual] |
Returns true if this type is directly streamable using read()/write() or toString()/fromString().
Implements RTT::types::StreamFactory.
Reimplemented in RTT::types::BoolTypeInfo.
Definition at line 107 of file PrimitiveTypeInfo.hpp.
virtual std::istream& RTT::types::PrimitiveTypeInfo< T, use_ostream >::read | ( | std::istream & | os, |
base::DataSourceBase::shared_ptr | out | ||
) | const [inline, virtual] |
Read a new value for this datasource from a human readable string. The default does nothing.
Implements RTT::types::StreamFactory.
Reimplemented in RTT::types::BoolTypeInfo.
Definition at line 98 of file PrimitiveTypeInfo.hpp.
virtual std::ostream& RTT::types::PrimitiveTypeInfo< T, use_ostream >::write | ( | std::ostream & | os, |
base::DataSourceBase::shared_ptr | in | ||
) | const [inline, virtual] |
Output this datasource as a human readable string. The default just writes the type name in parentheses to os.
Implements RTT::types::StreamFactory.
Reimplemented in RTT::types::BoolTypeInfo.
Definition at line 90 of file PrimitiveTypeInfo.hpp.
boost::shared_ptr<PrimitiveTypeInfo<T, use_ostream> > RTT::types::PrimitiveTypeInfo< T, use_ostream >::mshared [protected] |
Definition at line 39 of file PrimitiveTypeInfo.hpp.
const std::string RTT::types::PrimitiveTypeInfo< T, use_ostream >::tname [protected] |
Definition at line 38 of file PrimitiveTypeInfo.hpp.