Public Types | Public Member Functions | Private Attributes
RTT::internal::OffsetDataSource Class Reference

#include <OffsetPartDataSource.hpp>

Inheritance diagram for RTT::internal::OffsetDataSource:
Inheritance graph
[legend]

List of all members.

Public Types

typedef unsigned int offset_type
typedef boost::intrusive_ptr
< OffsetDataSource
shared_ptr

Public Member Functions

virtual OffsetDataSourceclone () const
virtual OffsetDataSourcecopy (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

Detailed Description

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.


Member Typedef Documentation

Definition at line 60 of file OffsetPartDataSource.hpp.

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.


Constructor & Destructor Documentation

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.

Parameters:
sizeThe size of the element referenced to by index.
indexDatasource pointing to the index for use in operator[]
parent_offsetThe offset to which the parent may be subject itself.

Definition at line 72 of file OffsetPartDataSource.hpp.


Member Function Documentation

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]

Return the data as type T.

Implements RTT::internal::DataSource< unsigned int >.

Definition at line 79 of file OffsetPartDataSource.hpp.

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.

Note:
Getting a reference to an internal data structure is not thread-safe.

Implements RTT::internal::DataSource< unsigned int >.

Definition at line 92 of file OffsetPartDataSource.hpp.

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.


Member Data Documentation

unsigned int RTT::internal::OffsetDataSource::mdata [mutable, private]

Definition at line 116 of file OffsetPartDataSource.hpp.

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.


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


rtt
Author(s): RTT Developers
autogenerated on Mon Oct 6 2014 03:13:59