Public Member Functions
RTT::types::BoostArrayTypeInfo< T, has_ostream > Class Template Reference

#include <BoostArrayTypeInfo.hpp>

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

List of all members.

Public Member Functions

 BoostArrayTypeInfo (std::string name)
virtual bool composeType (base::DataSourceBase::shared_ptr dssource, base::DataSourceBase::shared_ptr dsresult) const
virtual
base::DataSourceBase::shared_ptr 
decomposeType (base::DataSourceBase::shared_ptr source) const
virtual
base::DataSourceBase::shared_ptr 
getMember (base::DataSourceBase::shared_ptr item, const std::string &name) const
virtual
base::DataSourceBase::shared_ptr 
getMember (base::DataSourceBase::shared_ptr item, base::DataSourceBase::shared_ptr id) const
virtual std::vector< std::string > getMemberNames () const
bool installTypeInfoObject (TypeInfo *ti)

Detailed Description

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

Template for data types that are of type boost::array<U,int>. You can not use this type as a port data type. Normally, using this class is not required since RTT converts all boost::array instances to types::carray, which is represented by the CArrayTypeInfo class. Be aware that this type info object only represents the boost::array of one size, ie, this scales badly ! A CArrayTypeInfo can represent a fixed size array of any size.

Parameters:
TA boost::array<U,N> wrapper, where U is a data type and N the array size.

Definition at line 68 of file BoostArrayTypeInfo.hpp.


Constructor & Destructor Documentation

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

Definition at line 73 of file BoostArrayTypeInfo.hpp.


Member Function Documentation

template<typename T , bool has_ostream = false>
virtual bool RTT::types::BoostArrayTypeInfo< T, has_ostream >::composeType ( base::DataSourceBase::shared_ptr  source,
base::DataSourceBase::shared_ptr  target 
) const [inline, 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().

Parameters:
sourceA data source of the same type as target OR a PropertyBag that contains the parts of target to be refreshed.
targetA data source of the same type as this TypeInfo object which contains the data to be updated from source.
Returns:
true if source could be updated, false otherwise.
See also:
types::propertyDecomposition and types::typeDecomposition for the inverse function, decomposing a type into datasources and hierarchical properties.
decomposeType to do the inverse operation.

Implements RTT::types::CompositionFactory.

Definition at line 154 of file BoostArrayTypeInfo.hpp.

template<typename T , bool has_ostream = false>
virtual base::DataSourceBase::shared_ptr RTT::types::BoostArrayTypeInfo< T, has_ostream >::decomposeType ( base::DataSourceBase::shared_ptr  source) const [inline, virtual]

Use getMember() for decomposition...

Reimplemented from RTT::types::CompositionFactory.

Definition at line 149 of file BoostArrayTypeInfo.hpp.

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

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 99 of file BoostArrayTypeInfo.hpp.

template<typename T , bool has_ostream = false>
virtual base::DataSourceBase::shared_ptr RTT::types::BoostArrayTypeInfo< T, has_ostream >::getMember ( base::DataSourceBase::shared_ptr  item,
base::DataSourceBase::shared_ptr  id 
) const [inline, virtual]

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 121 of file BoostArrayTypeInfo.hpp.

template<typename T , bool has_ostream = false>
virtual std::vector<std::string> RTT::types::BoostArrayTypeInfo< T, has_ostream >::getMemberNames ( ) const [inline, virtual]

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 91 of file BoostArrayTypeInfo.hpp.

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

Reimplemented from RTT::types::PrimitiveTypeInfo< T, has_ostream >.

Definition at line 78 of file BoostArrayTypeInfo.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Mon Oct 6 2014 03:14:00