Public Types | Public Member Functions | Protected Attributes
RTT::types::PrimitiveTypeInfo< T, use_ostream > Class Template Reference

#include <PrimitiveTypeInfo.hpp>

Inheritance diagram for RTT::types::PrimitiveTypeInfo< T, use_ostream >:
Inheritance graph
[legend]

List of all members.

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 ()
TypeInfogetTypeInfoObject () 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

Detailed Description

template<typename T, bool use_ostream = false>
class RTT::types::PrimitiveTypeInfo< T, use_ostream >

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.

Parameters:
TThe user class type.
use_ostreamWhen 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.
See also:
TypeInfoRepository.
operator<<
StructTypeInfo, SequenceTypeInfo, CArrayTypeInfo, BoostArrayTypeInfo

Definition at line 32 of file PrimitiveTypeInfo.hpp.


Member Typedef Documentation

template<typename T, bool use_ostream = false>
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.


Constructor & Destructor Documentation

template<typename T, bool use_ostream = false>
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.

Parameters:
namethe 'Orocos' type name.

Definition at line 53 of file PrimitiveTypeInfo.hpp.

template<typename T, bool use_ostream = false>
virtual RTT::types::PrimitiveTypeInfo< T, use_ostream >::~PrimitiveTypeInfo ( ) [inline, virtual]

Definition at line 58 of file PrimitiveTypeInfo.hpp.


Member Function Documentation

template<typename T, bool use_ostream = false>
virtual bool RTT::types::PrimitiveTypeInfo< T, use_ostream >::composeType ( base::DataSourceBase::shared_ptr  source,
base::DataSourceBase::shared_ptr  result 
) const [inline, virtual]
template<typename T, bool use_ostream = false>
virtual base::DataSourceBase::shared_ptr RTT::types::PrimitiveTypeInfo< T, use_ostream >::decomposeType ( base::DataSourceBase::shared_ptr  source) const [inline, virtual]
template<typename T, bool use_ostream = false>
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.

template<typename T, bool use_ostream = false>
boost::shared_ptr<PrimitiveTypeInfo<T, use_ostream> > RTT::types::PrimitiveTypeInfo< T, use_ostream >::getSharedPtr ( ) [inline]

Definition at line 62 of file PrimitiveTypeInfo.hpp.

template<typename T, bool use_ostream = false>
TypeInfo* RTT::types::PrimitiveTypeInfo< T, use_ostream >::getTypeInfoObject ( ) const [inline, virtual]

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

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

Implements RTT::types::TypeInfoGenerator.

Definition at line 84 of file PrimitiveTypeInfo.hpp.

template<typename T, bool use_ostream = false>
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.

template<typename T, bool use_ostream = false>
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.

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.

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.

template<typename T, bool use_ostream = false>
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.

template<typename T, bool use_ostream = false>
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.

template<typename T, bool use_ostream = false>
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.


Member Data Documentation

template<typename T, bool use_ostream = false>
boost::shared_ptr<PrimitiveTypeInfo<T, use_ostream> > RTT::types::PrimitiveTypeInfo< T, use_ostream >::mshared [protected]

Definition at line 39 of file PrimitiveTypeInfo.hpp.

template<typename T, bool use_ostream = false>
const std::string RTT::types::PrimitiveTypeInfo< T, use_ostream >::tname [protected]

Definition at line 38 of file PrimitiveTypeInfo.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Sat Jun 8 2019 18:46:40