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

#include <BufferInterface.hpp>

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

List of all members.

Public Types

typedef boost::call_traits< T >
::param_type 
param_t
typedef boost::call_traits< T >
::param_type 
param_t
typedef boost::call_traits< T >
::reference 
reference_t
typedef boost::call_traits< T >
::reference 
reference_t
typedef boost::shared_ptr
< BufferInterface< T > > 
shared_ptr
typedef boost::shared_ptr
< BufferInterface< T > > 
shared_ptr
typedef BufferBase::size_type size_type
typedef BufferBase::size_type size_type
typedef T value_t
typedef T value_t

Public Member Functions

virtual void data_sample (const T &sample)=0
virtual void data_sample (const T &sample)=0
virtual size_type Pop (std::vector< value_t > &items)=0
virtual bool Pop (reference_t item)=0
virtual size_type Pop (std::vector< value_t > &items)=0
virtual bool Pop (reference_t item)=0
virtual value_tPopWithoutRelease ()=0
virtual value_tPopWithoutRelease ()=0
virtual size_type Push (const std::vector< value_t > &items)=0
virtual bool Push (param_t item)=0
virtual size_type Push (const std::vector< value_t > &items)=0
virtual bool Push (param_t item)=0
virtual void Release (value_t *item)=0
virtual void Release (value_t *item)=0
virtual ~BufferInterface ()
virtual ~BufferInterface ()

Detailed Description

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

A Buffer is an object which is used to store (Push) and retrieve (Pop) values from.

Parameters:
T The value type stored in this buffer.

Definition at line 55 of file install/include/rtt/base/BufferInterface.hpp.


Member Typedef Documentation

template<class T>
typedef boost::call_traits<T>::param_type RTT::base::BufferInterface< T >::param_t
template<class T>
typedef boost::call_traits<T>::param_type RTT::base::BufferInterface< T >::param_t
template<class T>
typedef boost::call_traits<T>::reference RTT::base::BufferInterface< T >::reference_t
template<class T>
typedef boost::call_traits<T>::reference RTT::base::BufferInterface< T >::reference_t
template<class T>
typedef boost::shared_ptr< BufferInterface<T> > RTT::base::BufferInterface< T >::shared_ptr

Reimplemented from RTT::base::BufferBase.

Definition at line 62 of file rtt/base/BufferInterface.hpp.

template<class T>
typedef boost::shared_ptr< BufferInterface<T> > RTT::base::BufferInterface< T >::shared_ptr

Reimplemented from RTT::base::BufferBase.

Definition at line 62 of file install/include/rtt/base/BufferInterface.hpp.

template<class T>
typedef T RTT::base::BufferInterface< T >::value_t
template<class T>
typedef T RTT::base::BufferInterface< T >::value_t

Constructor & Destructor Documentation

template<class T>
virtual RTT::base::BufferInterface< T >::~BufferInterface (  )  [inline, virtual]

Definition at line 66 of file install/include/rtt/base/BufferInterface.hpp.

template<class T>
virtual RTT::base::BufferInterface< T >::~BufferInterface (  )  [inline, virtual]

Definition at line 66 of file rtt/base/BufferInterface.hpp.


Member Function Documentation

template<class T>
virtual void RTT::base::BufferInterface< T >::data_sample ( const T &  sample  )  [pure virtual]

Initializes this buffer with a data sample, such that for dynamical allocated types T, the buffer can reserve place to hold these elements.

Postcondition:
Calling this function causes all data in the buffer to be lost and the size being reset to zero.

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual void RTT::base::BufferInterface< T >::data_sample ( const T &  sample  )  [pure virtual]

Initializes this buffer with a data sample, such that for dynamical allocated types T, the buffer can reserve place to hold these elements.

Postcondition:
Calling this function causes all data in the buffer to be lost and the size being reset to zero.

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual size_type RTT::base::BufferInterface< T >::Pop ( std::vector< value_t > &  items  )  [pure virtual]

Read the whole buffer.

Parameters:
items is to be filled with all values in the buffer, with items.begin() the oldest value.
Returns:
the number of items read.

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual bool RTT::base::BufferInterface< T >::Pop ( reference_t  item  )  [pure virtual]

Read the oldest value from the buffer.

Parameters:
item is to be set with a value from the buffer.
Returns:
true if something was read.

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual size_type RTT::base::BufferInterface< T >::Pop ( std::vector< value_t > &  items  )  [pure virtual]

Read the whole buffer.

Parameters:
items is to be filled with all values in the buffer, with items.begin() the oldest value.
Returns:
the number of items read.

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual bool RTT::base::BufferInterface< T >::Pop ( reference_t  item  )  [pure virtual]

Read the oldest value from the buffer.

Parameters:
item is to be set with a value from the buffer.
Returns:
true if something was read.

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual value_t* RTT::base::BufferInterface< T >::PopWithoutRelease (  )  [pure virtual]

Returns a pointer to the first element in the buffer. The pointer is only garanteed to stay valid until the next pop operation.

Note the pointer needs the be released by calling Release on the buffer.

Returns:
a pointer to a sample or Zero if buffer is empty

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual value_t* RTT::base::BufferInterface< T >::PopWithoutRelease (  )  [pure virtual]

Returns a pointer to the first element in the buffer. The pointer is only garanteed to stay valid until the next pop operation.

Note the pointer needs the be released by calling Release on the buffer.

Returns:
a pointer to a sample or Zero if buffer is empty

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual size_type RTT::base::BufferInterface< T >::Push ( const std::vector< value_t > &  items  )  [pure virtual]

Write a sequence of values to the buffer.

Parameters:
items the values to write
Returns:
the number of values written (may be less than items.size())

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual bool RTT::base::BufferInterface< T >::Push ( param_t  item  )  [pure virtual]

Write a single value to the buffer.

Parameters:
item the value to write
Returns:
false if the buffer is full.

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual size_type RTT::base::BufferInterface< T >::Push ( const std::vector< value_t > &  items  )  [pure virtual]

Write a sequence of values to the buffer.

Parameters:
items the values to write
Returns:
the number of values written (may be less than items.size())

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual bool RTT::base::BufferInterface< T >::Push ( param_t  item  )  [pure virtual]

Write a single value to the buffer.

Parameters:
item the value to write
Returns:
false if the buffer is full.

Implemented in RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, RTT::base::BufferUnSync< T >, RTT::base::BufferLocked< T >, RTT::base::BufferLockFree< T >, and RTT::base::BufferUnSync< T >.

template<class T>
virtual void RTT::base::BufferInterface< T >::Release ( value_t item  )  [pure virtual]
template<class T>
virtual void RTT::base::BufferInterface< T >::Release ( value_t item  )  [pure virtual]

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:50 2013