Public Member Functions | List of all members
RTT::types::StructTypeInfo< T, has_ostream > Class Template Reference

#include <rtt-types-fwd.hpp>

Inheritance diagram for RTT::types::StructTypeInfo< T, has_ostream >:
Inheritance graph
[legend]

Public Member Functions

virtual bool composeTypeImpl (const PropertyBag &source, typename internal::AssignableDataSource< T >::reference_t result) const
 
virtual base::DataSourceBase::shared_ptr getMember (base::DataSourceBase::shared_ptr item, base::DataSourceBase::shared_ptr id) const
 
virtual base::DataSourceBase::shared_ptr getMember (base::DataSourceBase::shared_ptr item, const std::string &name) const
 
virtual bool getMember (internal::Reference *ref, base::DataSourceBase::shared_ptr item, const std::string &name) const
 
virtual std::vector< std::string > getMemberNames () const
 
bool installTypeInfoObject (TypeInfo *ti)
 
virtual bool resize (base::DataSourceBase::shared_ptr arg, int size) const
 
 StructTypeInfo (std::string name)
 
- Public Member Functions inherited from RTT::types::TemplateTypeInfo< T, has_ostream >
virtual base::ChannelElementBase::shared_ptr buildRemoteChannelOutput (base::OutputPortInterface &output_port, types::TypeInfo const *type_info, base::InputPortInterface &input, const ConnPolicy &policy)
 
bool installTypeInfoObject (TypeInfo *ti)
 
 TemplateTypeInfo (std::string name)
 
virtual ~TemplateTypeInfo ()
 
- Public Member Functions inherited from RTT::types::PrimitiveTypeInfo< T, use_ostream >
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
 
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 ()
 
- Public Member Functions inherited from RTT::types::TypeInfoGenerator
virtual ~TypeInfoGenerator ()
 
- Public Member Functions inherited from RTT::types::TemplateValueFactory< T >
base::DataSourceBase::shared_ptr buildActionAlias (base::ActionInterface *action, base::DataSourceBase::shared_ptr in) const
 
base::AttributeBasebuildAlias (std::string name, base::DataSourceBase::shared_ptr in) const
 
base::AttributeBasebuildAttribute (std::string name, base::DataSourceBase::shared_ptr in) const
 
base::AttributeBasebuildConstant (std::string name, base::DataSourceBase::shared_ptr dsb) const
 
virtual base::PropertyBasebuildProperty (const std::string &name, const std::string &desc, base::DataSourceBase::shared_ptr source=0) const
 
virtual base::DataSourceBase::shared_ptr buildReference (void *ptr) const
 
virtual base::DataSourceBase::shared_ptr buildValue () const
 
base::AttributeBasebuildVariable (std::string name) const
 
- Public Member Functions inherited from RTT::types::ValueFactory
virtual ~ValueFactory ()
 
virtual base::AttributeBasebuildConstant (std::string name, base::DataSourceBase::shared_ptr, int sizehint) const
 
virtual base::AttributeBasebuildVariable (std::string name, int sizehint) const
 
- Public Member Functions inherited from RTT::types::StreamFactory
virtual ~StreamFactory ()
 
virtual std::string toString (base::DataSourceBase::shared_ptr in) const
 
virtual bool fromString (const std::string &value, base::DataSourceBase::shared_ptr out) const
 
- Public Member Functions inherited from RTT::types::TemplateConnFactory< T >
base::ChannelElementBase::shared_ptr buildChannelInput (base::OutputPortInterface &port, ConnPolicy const &policy) const
 
base::ChannelElementBase::shared_ptr buildChannelOutput (base::InputPortInterface &port, ConnPolicy const &policy) const
 
base::ChannelElementBase::shared_ptr buildDataStorage (ConnPolicy const &policy) const
 
internal::SharedConnectionBase::shared_ptr buildSharedConnection (base::OutputPortInterface *output_port, base::InputPortInterface *input_port, ConnPolicy const &policy) const
 
base::InputPortInterfaceinputPort (std::string const &name) const
 
base::OutputPortInterfaceoutputPort (std::string const &name) const
 
- Public Member Functions inherited from RTT::types::TemplateCompositionFactory< T >
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 decomposeTypeImpl (typename internal::AssignableDataSource< T >::const_reference_t source, PropertyBag &targetbag) const
 
- Public Member Functions inherited from RTT::types::CompositionFactory
virtual base::DataSourceBase::shared_ptr convertType (base::DataSourceBase::shared_ptr source) const
 
virtual ~CompositionFactory ()
 
- Public Member Functions inherited from RTT::types::MemberFactory
virtual ~MemberFactory ()
 

Additional Inherited Members

- Public Types inherited from RTT::types::TemplateTypeInfo< T, has_ostream >
typedef T UserType
 
- Public Types inherited from RTT::types::PrimitiveTypeInfo< T, use_ostream >
typedef T DataType
 
- Public Types inherited from RTT::types::TemplateValueFactory< T >
typedef T DataType
 
- Public Types inherited from RTT::types::TemplateCompositionFactory< T >
typedef T UserType
 
- Protected Attributes inherited from RTT::types::PrimitiveTypeInfo< T, use_ostream >
boost::shared_ptr< PrimitiveTypeInfo< T, use_ostream > > mshared
 
const std::string tname
 

Detailed Description

template<typename T, bool has_ostream = false>
class RTT::types::StructTypeInfo< T, has_ostream >

Type Information for data types that are structs, ie all user data types fall in this category.

Use this class to register your data type to the Orocos type system.

This class requires that your struct is compatible with the boost::serialization API. This means that it must provide a serialize() function or that you define a free function serialize() in the boost::serialization namespace. If no such function exists, you can fall back to StdTypeInfo or even TemplateTypeInfo.

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

Constructor & Destructor Documentation

template<typename T , bool has_ostream = false>
RTT::types::StructTypeInfo< T, has_ostream >::StructTypeInfo ( std::string  name)
inline

Definition at line 65 of file StructTypeInfo.hpp.

Member Function Documentation

template<typename T , bool has_ostream = false>
virtual bool RTT::types::StructTypeInfo< T, has_ostream >::composeTypeImpl ( const PropertyBag source,
typename internal::AssignableDataSource< T >::reference_t  result 
) const
inlinevirtual

Implementation that updates result with the matching parts in source Relies on the fact that getMember returns a C++ reference to each part of result, which is then updated with a property found in source.

Reimplemented from RTT::types::TemplateCompositionFactory< T >.

Definition at line 150 of file StructTypeInfo.hpp.

template<typename T , bool has_ostream = false>
virtual base::DataSourceBase::shared_ptr RTT::types::StructTypeInfo< T, has_ostream >::getMember ( base::DataSourceBase::shared_ptr  item,
base::DataSourceBase::shared_ptr  id 
) const
inlinevirtual

Returns a member of a given data source identified by a data source id. This will be an int (for indexing) or a string (for the member name).

Warning
Currently this only works for a SequenceTypeInfo-like object. We don't implement this for StructTypeInfo-like objects, since that would be a very expensive implementation (memory wise).
Parameters
itemThe item of which to return a member
idOr 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

Reimplemented from RTT::types::MemberFactory.

Definition at line 91 of file StructTypeInfo.hpp.

template<typename T , bool has_ostream = false>
virtual base::DataSourceBase::shared_ptr RTT::types::StructTypeInfo< T, has_ostream >::getMember ( base::DataSourceBase::shared_ptr  item,
const std::string &  name 
) const
inlinevirtual

Returns a member of a given data source struct identified by its name.

Parameters
itemThe item of which to return a reference to a member
nameThe 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.
Returns
null if no such member exists, an assignable datasource referencing that member otherwise.

Reimplemented from RTT::types::MemberFactory.

Definition at line 101 of file StructTypeInfo.hpp.

template<typename T , bool has_ostream = false>
virtual bool RTT::types::StructTypeInfo< T, has_ostream >::getMember ( internal::Reference ref,
base::DataSourceBase::shared_ptr  item,
const std::string &  name 
) const
inlinevirtual

Stores a reference to a member of a struct identified by its name. This method does not allocate memory when item is assignable..

Parameters
refThe reference object in which to store the reference.
itemThe item of which to return a reference to a member. It must be assignable, otherwise, a reference to a copy of item will be returned. This copy will allocate memory.
nameThe name of a member within item.
Returns
false if no such member exists, true if ref got filled in otherwise.

Reimplemented from RTT::types::MemberFactory.

Definition at line 120 of file StructTypeInfo.hpp.

template<typename T , bool has_ostream = false>
virtual std::vector<std::string> RTT::types::StructTypeInfo< T, has_ostream >::getMemberNames ( ) const
inlinevirtual

Returns the list of struct member names of this type. In case this type is not a struct, returns an empty list.

Reimplemented from RTT::types::MemberFactory.

Definition at line 83 of file StructTypeInfo.hpp.

template<typename T , bool has_ostream = false>
bool RTT::types::StructTypeInfo< T, has_ostream >::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::PrimitiveTypeInfo< T, use_ostream >.

Definition at line 70 of file StructTypeInfo.hpp.

template<typename T , bool has_ostream = false>
virtual bool RTT::types::StructTypeInfo< T, has_ostream >::resize ( base::DataSourceBase::shared_ptr  arg,
int  size 
) const
inlinevirtual

Tries to resize a data source in case it's a resizable sequence.

Returns
true if the resizing could be done, false otherwise.

Reimplemented from RTT::types::MemberFactory.

Definition at line 139 of file StructTypeInfo.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:46