Orocos Real-Time Toolkit  2.9.0
Classes | Public Types | Public Member Functions | List of all members

Any Buffer has a capacity, size and can be empty or full. More...

#include <rtt/base/BufferBase.hpp>

Inheritance diagram for RTT::base::BufferBase:
RTT::base::BufferInterface< T > RTT::base::BufferLocked< T > RTT::base::BufferLockFree< T > RTT::base::BufferUnSync< T > RTT::base::Buffer< T >

Classes

class  Options
 

Public Types

typedef int size_type
 
typedef boost::shared_ptr< BufferBaseshared_ptr
 

Public Member Functions

virtual ~BufferBase ()
 
virtual size_type capacity () const =0
 Returns the maximum number of items that can be stored in the buffer. More...
 
virtual size_type size () const =0
 Returns the actual number of items that are stored in the buffer. More...
 
virtual bool empty () const =0
 Check if this buffer is empty. More...
 
virtual bool full () const =0
 Check if this buffer is full. More...
 
virtual void clear ()=0
 Clears all contents of this buffer. More...
 
virtual size_type dropped () const =0
 Returns the number of dropped samples, because the buffer was full. More...
 

Detailed Description

Any Buffer has a capacity, size and can be empty or full.

This class contains the type-independent methods of a Buffer.

Definition at line 53 of file BufferBase.hpp.

Member Typedef Documentation

typedef boost::shared_ptr< BufferBase > RTT::base::BufferBase::shared_ptr

Definition at line 57 of file BufferBase.hpp.

Definition at line 56 of file BufferBase.hpp.

Constructor & Destructor Documentation

BufferBase::~BufferBase ( )
virtual

Definition at line 46 of file BufferBase.cpp.

Member Function Documentation

virtual size_type RTT::base::BufferBase::capacity ( ) const
pure virtual

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

Returns
maximum number of items.

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

Referenced by RTT::internal::ChannelBufferElement< T >::getBufferSize().

virtual void RTT::base::BufferBase::clear ( )
pure virtual
virtual size_type RTT::base::BufferBase::dropped ( ) const
pure virtual

Returns the number of dropped samples, because the buffer was full.

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

Referenced by RTT::internal::ChannelBufferElement< T >::getNumDroppedSamples().

virtual bool RTT::base::BufferBase::empty ( ) const
pure virtual

Check if this buffer is empty.

Returns
true if size() == 0

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

virtual bool RTT::base::BufferBase::full ( ) const
pure virtual

Check if this buffer is full.

Returns
true if size() == capacity()

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

virtual size_type RTT::base::BufferBase::size ( ) const
pure virtual

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

Returns
number of items.

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

Referenced by RTT::internal::ChannelBufferElement< T >::getBufferFillSize().


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