RTT::base::DataObjectLocked< T > Class Template Reference
[Data Storage and Buffering classes.]

A class which provides locked/protected access to one typed element of data. More...

#include <DataObjectLocked.hpp>

Inheritance diagram for RTT::base::DataObjectLocked< T >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef T DataType
typedef T DataType

Public Member Functions

virtual void data_sample (const DataType &sample)
virtual void data_sample (const DataType &sample)
 DataObjectLocked (const T &initial_value=T())
 DataObjectLocked (const T &initial_value=T())
virtual DataType Get () const
virtual void Get (DataType &pull) const
virtual DataType Get () const
virtual void Get (DataType &pull) const
virtual void Set (const DataType &push)
virtual void Set (const DataType &push)

Private Attributes

data
os::Mutex lock

Detailed Description

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

A class which provides locked/protected access to one typed element of data.

It allows multiple read/write requests using a single lock. This is the in any case threadsafe implementation, and can be blocking in situations where you do not want that.

Definition at line 57 of file install/include/rtt/base/DataObjectLocked.hpp.


Member Typedef Documentation

template<class T >
typedef T RTT::base::DataObjectLocked< T >::DataType

The type of the data.

Reimplemented from RTT::base::DataObjectInterface< T >.

Definition at line 78 of file rtt/base/DataObjectLocked.hpp.

template<class T >
typedef T RTT::base::DataObjectLocked< T >::DataType

The type of the data.

Reimplemented from RTT::base::DataObjectInterface< T >.

Definition at line 78 of file install/include/rtt/base/DataObjectLocked.hpp.


Constructor & Destructor Documentation

template<class T >
RTT::base::DataObjectLocked< T >::DataObjectLocked ( const T &  initial_value = T()  )  [inline]

Construct a DataObjectLocked by name.

Parameters:
_name The name of this DataObject.

Definition at line 72 of file install/include/rtt/base/DataObjectLocked.hpp.

template<class T >
RTT::base::DataObjectLocked< T >::DataObjectLocked ( const T &  initial_value = T()  )  [inline]

Construct a DataObjectLocked by name.

Parameters:
_name The name of this DataObject.

Definition at line 72 of file rtt/base/DataObjectLocked.hpp.


Member Function Documentation

template<class T >
virtual void RTT::base::DataObjectLocked< T >::data_sample ( const DataType sample  )  [inline, virtual]

Provides a data sample to initialize this data object. As such enough storage space can be allocated before the actual writing begins.

Parameters:
sample 

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

Definition at line 86 of file rtt/base/DataObjectLocked.hpp.

template<class T >
virtual void RTT::base::DataObjectLocked< T >::data_sample ( const DataType sample  )  [inline, virtual]

Provides a data sample to initialize this data object. As such enough storage space can be allocated before the actual writing begins.

Parameters:
sample 

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

Definition at line 86 of file install/include/rtt/base/DataObjectLocked.hpp.

template<class T >
virtual DataType RTT::base::DataObjectLocked< T >::Get (  )  const [inline, virtual]

Get a copy of the data of this data object.

Returns:
A copy of the data.

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

Definition at line 82 of file rtt/base/DataObjectLocked.hpp.

template<class T >
virtual void RTT::base::DataObjectLocked< T >::Get ( DataType pull  )  const [inline, virtual]

Get a copy of the Data of this data object.

Parameters:
pull A copy of the data.

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

Definition at line 80 of file rtt/base/DataObjectLocked.hpp.

template<class T >
virtual DataType RTT::base::DataObjectLocked< T >::Get (  )  const [inline, virtual]

Get a copy of the data of this data object.

Returns:
A copy of the data.

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

Definition at line 82 of file install/include/rtt/base/DataObjectLocked.hpp.

template<class T >
virtual void RTT::base::DataObjectLocked< T >::Get ( DataType pull  )  const [inline, virtual]

Get a copy of the Data of this data object.

Parameters:
pull A copy of the data.

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

Definition at line 80 of file install/include/rtt/base/DataObjectLocked.hpp.

template<class T >
virtual void RTT::base::DataObjectLocked< T >::Set ( const DataType push  )  [inline, virtual]

Set the data to a certain value.

Parameters:
push The data which must be set.

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

Definition at line 84 of file rtt/base/DataObjectLocked.hpp.

template<class T >
virtual void RTT::base::DataObjectLocked< T >::Set ( const DataType push  )  [inline, virtual]

Set the data to a certain value.

Parameters:
push The data which must be set.

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

Definition at line 84 of file install/include/rtt/base/DataObjectLocked.hpp.


Member Data Documentation

template<class T >
T RTT::base::DataObjectLocked< T >::data [private]

One element of Data.

Definition at line 65 of file install/include/rtt/base/DataObjectLocked.hpp.

template<class T >
os::Mutex RTT::base::DataObjectLocked< T >::lock [mutable, private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:49:51 2013