#include <OffsetPartDataSource.hpp>
Public Types | |
typedef unsigned int | offset_type |
typedef boost::intrusive_ptr < OffsetDataSource > | shared_ptr |
Public Member Functions | |
virtual OffsetDataSource * | clone () const |
virtual OffsetDataSource * | copy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &replace) const |
DataSource< offset_type >::result_t | get () const |
OffsetDataSource (offset_type size, DataSource< unsigned int >::shared_ptr index, DataSource< offset_type >::shared_ptr parent_offset) | |
DataSource< offset_type > ::const_reference_t | rvalue () const |
DataSource< offset_type >::result_t | value () const |
~OffsetDataSource () | |
Private Attributes | |
unsigned int | mdata |
DataSource< unsigned int > ::shared_ptr | mindex |
DataSource< offset_type > ::shared_ptr | mparent_offset |
const unsigned int | msize |
Calculates an offset to an element in memory, based on a type size and an index. OffsetDataSources can be chained one to the other, in order to locate subsequences of subsequences. This data source is used in conjunction with OffsetPartDataSource or other data sources in ordert to manipulate a (sub)element in a (sub)sequence somewhere in memory. Setting this structure up is intricate and only meant for expert type system developers.
Definition at line 56 of file OffsetPartDataSource.hpp.
typedef unsigned int RTT::internal::OffsetDataSource::offset_type |
Definition at line 60 of file OffsetPartDataSource.hpp.
typedef boost::intrusive_ptr<OffsetDataSource > RTT::internal::OffsetDataSource::shared_ptr |
Use this type to store a pointer to a DataSourceBase.
Reimplemented from RTT::internal::DataSource< unsigned int >.
Definition at line 64 of file OffsetPartDataSource.hpp.
RTT::internal::OffsetDataSource::~OffsetDataSource | ( | ) | [inline] |
Definition at line 62 of file OffsetPartDataSource.hpp.
RTT::internal::OffsetDataSource::OffsetDataSource | ( | offset_type | size, |
DataSource< unsigned int >::shared_ptr | index, | ||
DataSource< offset_type >::shared_ptr | parent_offset | ||
) | [inline] |
The offset is size times the index plus any parent offset.
size | The size of the element referenced to by index. |
index | Datasource pointing to the index for use in operator[] |
parent_offset | The offset to which the parent may be subject itself. |
Definition at line 72 of file OffsetPartDataSource.hpp.
virtual OffsetDataSource* RTT::internal::OffsetDataSource::clone | ( | ) | const [inline, virtual] |
Return a shallow clone of this DataSource. This method returns a duplicate of this instance which re-uses the DataSources this internal::DataSource holds reference to. The clone() function is thus a non-deep copy.
Implements RTT::internal::DataSource< unsigned int >.
Definition at line 97 of file OffsetPartDataSource.hpp.
virtual OffsetDataSource* RTT::internal::OffsetDataSource::copy | ( | std::map< const base::DataSourceBase *, base::DataSourceBase * > & | replace | ) | const [inline, virtual] |
Implements RTT::internal::DataSource< unsigned int >.
Definition at line 101 of file OffsetPartDataSource.hpp.
DataSource<offset_type>::result_t RTT::internal::OffsetDataSource::get | ( | ) | const [inline, virtual] |
Return the data as type T.
Implements RTT::internal::DataSource< unsigned int >.
Definition at line 79 of file OffsetPartDataSource.hpp.
DataSource<offset_type>::const_reference_t RTT::internal::OffsetDataSource::rvalue | ( | ) | const [inline, virtual] |
Get a const reference to the value of this DataSource. You must call evaluate() prior to calling this function in order to get the most recent value of this attribute.
Implements RTT::internal::DataSource< unsigned int >.
Definition at line 92 of file OffsetPartDataSource.hpp.
DataSource<offset_type>::result_t RTT::internal::OffsetDataSource::value | ( | ) | const [inline, virtual] |
Return the result of the last evaluate() function. You must call evaluate() prior to calling this function in order to get the most recent value of this attribute.
Implements RTT::internal::DataSource< unsigned int >.
Definition at line 87 of file OffsetPartDataSource.hpp.
unsigned int RTT::internal::OffsetDataSource::mdata [mutable, private] |
Definition at line 116 of file OffsetPartDataSource.hpp.
DataSource<unsigned int>::shared_ptr RTT::internal::OffsetDataSource::mindex [private] |
Definition at line 118 of file OffsetPartDataSource.hpp.
Definition at line 120 of file OffsetPartDataSource.hpp.
const unsigned int RTT::internal::OffsetDataSource::msize [private] |
Definition at line 115 of file OffsetPartDataSource.hpp.