Orocos Real-Time Toolkit  2.8.3
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 >

Public Types

typedef T DataType
 The type of the data. More...
 
typedef boost::shared_ptr< DataObjectInterface< T > > shared_ptr
 Used for shared_ptr management. More...
 

Public Member Functions

 DataObjectUnSync (const T &initial_value=T())
 Construct a DataObjectUnSync by name. More...
 
virtual void Get (DataType &pull) const
 Get a copy of the Data of this data object. More...
 
virtual DataType Get () const
 Get a copy of the data of this data object. More...
 
virtual void Set (const DataType &push)
 Set the data to a certain value. More...
 
virtual void data_sample (const DataType &sample)
 Provides a data sample to initialize this data object. More...
 
virtual T data_sample () const
 

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 T RTT::base::DataObjectUnSync< T >::DataType

The type of the data.

Definition at line 74 of file DataObjectUnSync.hpp.

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

Used for shared_ptr management.

Definition at line 62 of file DataObjectInterface.hpp.

Constructor & Destructor Documentation

template<class T >
RTT::base::DataObjectUnSync< T >::DataObjectUnSync ( const T &  initial_value = T())
inline

Construct a DataObjectUnSync by name.

Parameters
_nameThe name of this DataObject.

Definition at line 68 of file DataObjectUnSync.hpp.

Member Function Documentation

template<class T >
virtual void RTT::base::DataObjectUnSync< T >::data_sample ( const DataType sample)
inlinevirtual

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 82 of file DataObjectUnSync.hpp.

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

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

Definition at line 86 of file DataObjectUnSync.hpp.

template<class T >
virtual void RTT::base::DataObjectUnSync< T >::Get ( DataType pull) const
inlinevirtual

Get a copy of the Data of this data object.

Parameters
pullA copy of the data.

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

Definition at line 76 of file DataObjectUnSync.hpp.

template<class T >
virtual DataType 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 78 of file DataObjectUnSync.hpp.

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

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

template<class T >
virtual void RTT::base::DataObjectUnSync< T >::Set ( const DataType push)
inlinevirtual

Set the data to a certain value.

Parameters
pushThe data which must be set.

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

Definition at line 80 of file DataObjectUnSync.hpp.

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


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