RTT::ReadInterface< T > Class Template Reference

This interface describes a read interface for value types. More...

#include <rtt/ReadInterface.hpp>

Inheritance diagram for RTT::ReadInterface< T >:
RTT::BufferBase RTT::BufferInterface< T > RTT::BufferLocked< T, ReadPolicy, WritePolicy > RTT::BufferLockFree< T, ReadPolicy, WritePolicy > RTT::Corba::CorbaBufferProxy< T > RTT::Buffer< T, ReadPolicy, WritePolicy >

List of all members.

Public Types

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

Public Member Functions

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.

Detailed Description

template<class T>
class RTT::ReadInterface< T >

This interface describes a read interface for value types.

Parameters:
T The value type read from this buffer.

Definition at line 54 of file ReadInterface.hpp.


Member Function Documentation

virtual size_type RTT::BufferBase::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 RTT::BufferLocked< T, ReadPolicy, WritePolicy >, RTT::BufferLockFree< T, ReadPolicy, WritePolicy >, and RTT::Corba::CorbaBufferProxy< T >.

virtual bool RTT::BufferBase::empty (  )  const [pure virtual, inherited]
virtual bool RTT::BufferBase::full (  )  const [pure virtual, inherited]
template<class T>
virtual size_type RTT::ReadInterface< 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::BufferLocked< T, ReadPolicy, WritePolicy >, RTT::BufferLockFree< T, ReadPolicy, WritePolicy >, and RTT::Corba::CorbaBufferProxy< T >.

template<class T>
virtual bool RTT::ReadInterface< 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.
virtual size_type RTT::BufferBase::size (  )  const [pure virtual, inherited]

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

Returns:
number of items.

Implemented in RTT::BufferLocked< T, ReadPolicy, WritePolicy >, RTT::BufferLockFree< T, ReadPolicy, WritePolicy >, and RTT::Corba::CorbaBufferProxy< T >.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:44 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3