BufferInterface Class Template Reference
[Data Transfer Ports]

#include <rtt/BufferInterface.hpp>

Inheritance diagram for BufferInterface:

ReadInterface WriteInterface BufferBase BufferBase BufferLocked BufferLockFree CorbaBufferProxy

List of all members.


Detailed Description

template<class T>
class RTT::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 53 of file BufferInterface.hpp.


Public Types

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

Public Member Functions

virtual ~BufferInterface ()
virtual bool Pop (reference_t item)=0
 Read the oldest value from the buffer.
virtual size_type Pop (std::vector< value_t > &items)=0
 Read the whole buffer.
virtual value_t front () const =0
 Get the next value to be Pop()'ed, or the default value if empty.
virtual size_type capacity () const =0
 Returns the maximum number of items that can be stored in the buffer.
virtual size_type size () const =0
 Returns the actual number of items that are stored in the buffer.
virtual bool empty () const =0
 Check if this buffer is empty.
virtual bool full () const =0
 Check if this buffer is full.
virtual void clear ()=0
 Clears all contents of this buffer.
virtual bool Push (param_t item)=0
 Write a single value to the buffer.
virtual size_type Push (const std::vector< value_t > &items)=0
 Write a sequence of values to the buffer.

Member Function Documentation

virtual bool Pop ( reference_t  item  )  [pure virtual, inherited]

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.

virtual size_type Pop ( std::vector< value_t > &  items  )  [pure virtual, inherited]

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 BufferLocked, BufferLockFree, and CorbaBufferProxy.

virtual size_type capacity (  )  const [pure virtual, inherited]

Returns the maximum number of items that can be stored in the buffer.

Returns:
maximum number of items.

Implemented in BufferLocked, BufferLockFree, and CorbaBufferProxy.

virtual size_type size (  )  const [pure virtual, inherited]

Returns the actual number of items that are stored in the buffer.

Returns:
number of items.

Implemented in BufferLocked, BufferLockFree, and CorbaBufferProxy.

virtual bool empty (  )  const [pure virtual, inherited]

Check if this buffer is empty.

Returns:
true if size() == 0

Implemented in BufferLocked, BufferLockFree, and CorbaBufferProxy.

virtual bool full (  )  const [pure virtual, inherited]

Check if this buffer is full.

Returns:
true if size() == capacity()

Implemented in BufferLocked, BufferLockFree, and CorbaBufferProxy.

virtual bool Push ( param_t  item  )  [pure virtual, inherited]

Write a single value to the buffer.

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

virtual size_type Push ( const std::vector< value_t > &  items  )  [pure virtual, inherited]

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 BufferLocked, BufferLockFree, and CorbaBufferProxy.


The documentation for this class was generated from the following file:
Generated on Tue Mar 25 17:41:53 2008 for OrocosReal-TimeToolkit by  doxygen 1.5.3