A DataObjectInterface implements multi-threaded read/write solutions. More...
#include <DataObjectInterface.hpp>
Public Types | |
typedef boost::call_traits< T >::param_type | param_t |
typedef boost::call_traits< T >::reference | reference_t |
typedef boost::shared_ptr< DataObjectInterface< T > > | shared_ptr |
typedef T | value_t |
Public Member Functions | |
virtual void | clear ()=0 |
virtual bool | data_sample (param_t sample, bool reset=true)=0 |
virtual value_t | data_sample () const =0 |
DataObjectInterface () | |
virtual FlowStatus | Get (reference_t pull, bool copy_old_data=true) const =0 |
virtual value_t | Get () const =0 |
virtual bool | Set (param_t push)=0 |
virtual | ~DataObjectInterface () |
Public Member Functions inherited from RTT::base::DataObjectBase | |
virtual | ~DataObjectBase () |
A DataObjectInterface implements multi-threaded read/write solutions.
T | The DataType which can be Get() or Set() with this DataObject. |
Definition at line 58 of file DataObjectInterface.hpp.
typedef boost::call_traits<T>::param_type RTT::base::DataObjectInterface< T >::param_t |
Definition at line 62 of file DataObjectInterface.hpp.
typedef boost::call_traits<T>::reference RTT::base::DataObjectInterface< T >::reference_t |
Definition at line 63 of file DataObjectInterface.hpp.
typedef boost::shared_ptr<DataObjectInterface<T> > RTT::base::DataObjectInterface< T >::shared_ptr |
Used for shared_ptr management.
Definition at line 68 of file DataObjectInterface.hpp.
typedef T RTT::base::DataObjectInterface< T >::value_t |
Definition at line 61 of file DataObjectInterface.hpp.
|
inline |
Create a DataObject which is initially not reference counted.
Definition at line 73 of file DataObjectInterface.hpp.
|
inlinevirtual |
Destructor.
Definition at line 78 of file DataObjectInterface.hpp.
|
pure virtual |
Clears any data stored by this data object, so that any subsequent Get() without a new Set() will return NoData.
Implements RTT::base::DataObjectBase.
Implemented in RTT::base::DataObjectLockFree< T >, RTT::base::DataObjectLocked< T >, and RTT::base::DataObjectUnSync< T >.
|
pure virtual |
Provides a data sample to initialize this data object. As such enough storage space can be allocated before the actual writing begins.
sample | the data sample |
reset | enforce reinitialization even if this operation clears the stored data. |
Implemented in RTT::base::DataObjectLockFree< T >, RTT::base::DataObjectLocked< T >, and RTT::base::DataObjectUnSync< T >.
|
pure virtual |
Reads back a data sample.
Implemented in RTT::base::DataObjectLockFree< T >, RTT::base::DataObjectLocked< T >, and RTT::base::DataObjectUnSync< T >.
|
pure virtual |
Get a copy of the Data of this data object.
pull | A copy of the data. |
copy_old_data | If true, also copy the data if the data object has not been updated since the last call. |
Implemented in RTT::base::DataObjectLockFree< T >, RTT::base::DataObjectLocked< T >, and RTT::base::DataObjectUnSync< T >.
|
pure virtual |
Get a copy of the data of this data object.
Implemented in RTT::base::DataObjectLockFree< T >, RTT::base::DataObjectLocked< T >, and RTT::base::DataObjectUnSync< T >.
|
pure virtual |
Set the data to a certain value.
push | The data which must be set. |
Implemented in RTT::base::DataObjectLockFree< T >, RTT::base::DataObjectLocked< T >, and RTT::base::DataObjectUnSync< T >.