Orocos Real-Time Toolkit  2.9.0
Public Types | Public Member Functions | List of all members
RTT::base::DataObjectUnSync< T > Class Template Reference

A class which provides unprotected (not thread-safe) access to one typed element of data. More...

#include <rtt/base/DataObjectUnSync.hpp>

Inheritance diagram for RTT::base::DataObjectUnSync< T >:
RTT::base::DataObjectInterface< T > RTT::base::DataObjectBase

Public Types

typedef boost::shared_ptr< DataObjectInterface< T > > shared_ptr
 Used for shared_ptr management. More...
 

Public Member Functions

 DataObjectUnSync ()
 Construct an uninitialized DataObjectUnSync. More...
 
 DataObjectUnSync (param_t initial_value)
 Construct a DataObjectUnSync with initial value. More...
 
virtual FlowStatus Get (reference_t pull, bool copy_old_data=true) const
 Get a copy of the Data of this data object. More...
 
virtual value_t Get () const
 Get a copy of the data of this data object. More...
 
virtual bool Set (param_t push)
 Set the data to a certain value. More...
 
virtual bool data_sample (param_t sample, bool reset)
 Provides a data sample to initialize this data object. More...
 
virtual value_t data_sample () const
 Reads back a data sample. More...
 
virtual void clear ()
 Clears any data stored by this data object, so that any subsequent Get() without a new Set() will return NoData. More...
 

Detailed Description

template<class T>
class RTT::base::DataObjectUnSync< T >

A class which provides unprotected (not thread-safe) access to one typed element of data.

Definition at line 55 of file DataObjectUnSync.hpp.

Member Typedef Documentation

template<class T>
typedef boost::shared_ptr<DataObjectInterface<T> > RTT::base::DataObjectInterface< T >::shared_ptr
inherited

Used for shared_ptr management.

Definition at line 68 of file DataObjectInterface.hpp.

Constructor & Destructor Documentation

template<class T >
RTT::base::DataObjectUnSync< T >::DataObjectUnSync ( )
inline

Construct an uninitialized DataObjectUnSync.

Definition at line 74 of file DataObjectUnSync.hpp.

template<class T >
RTT::base::DataObjectUnSync< T >::DataObjectUnSync ( param_t  initial_value)
inline

Construct a DataObjectUnSync with initial value.

Definition at line 80 of file DataObjectUnSync.hpp.

Member Function Documentation

template<class T >
virtual void RTT::base::DataObjectUnSync< T >::clear ( )
inlinevirtual

Clears any data stored by this data object, so that any subsequent Get() without a new Set() will return NoData.

Implements RTT::base::DataObjectInterface< T >.

Definition at line 124 of file DataObjectUnSync.hpp.

References RTT::NoData.

template<class T >
virtual bool RTT::base::DataObjectUnSync< T >::data_sample ( param_t  sample,
bool  reset 
)
inlinevirtual

Provides a data sample to initialize this data object.

As such enough storage space can be allocated before the actual writing begins.

Parameters
samplethe data sample
resetenforce reinitialization even if this operation clears the stored data.
Returns
true if the data object was successfully (re)initialized.

Implements RTT::base::DataObjectInterface< T >.

Definition at line 106 of file DataObjectUnSync.hpp.

References RTT::base::DataObjectUnSync< T >::Set().

template<class T >
virtual value_t RTT::base::DataObjectUnSync< T >::data_sample ( ) const
inlinevirtual

Reads back a data sample.

Implements RTT::base::DataObjectInterface< T >.

Definition at line 119 of file DataObjectUnSync.hpp.

template<class T >
virtual FlowStatus RTT::base::DataObjectUnSync< T >::Get ( reference_t  pull,
bool  copy_old_data = true 
) const
inlinevirtual

Get a copy of the Data of this data object.

Parameters
pullA copy of the data.
copy_old_dataIf true, also copy the data if the data object has not been updated since the last call.

Implements RTT::base::DataObjectInterface< T >.

Definition at line 83 of file DataObjectUnSync.hpp.

References RTT::NewData, and RTT::OldData.

template<class T >
virtual value_t RTT::base::DataObjectUnSync< T >::Get ( ) const
inlinevirtual

Get a copy of the data of this data object.

Returns
A copy of the data.

Implements RTT::base::DataObjectInterface< T >.

Definition at line 94 of file DataObjectUnSync.hpp.

template<class T >
virtual bool RTT::base::DataObjectUnSync< T >::Set ( param_t  push)
inlinevirtual

Set the data to a certain value.

Parameters
pushThe data which must be set.

Implements RTT::base::DataObjectInterface< T >.

Definition at line 100 of file DataObjectUnSync.hpp.

References RTT::NewData.

Referenced by RTT::base::DataObjectUnSync< T >::data_sample().


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