Embedded Template Library  1.0
 All Classes Files Functions Variables Typedefs Friends Modules Pages
etl::queue_base Class Reference

#include <queue_base.h>

Public Types

typedef size_t size_type
 The type used for determining the size of queue.
 

Public Member Functions

size_type size () const
 Returns the current number of items in the queue.
 
size_type capacity () const
 Returns the maximum number of items that can be queued.
 
size_type max_size () const
 Returns the maximum number of items that can be queued.
 
bool empty () const
 
bool full () const
 
size_t available () const
 
void clear ()
 Clears the queue to the empty state.
 
void pop ()
 

Protected Member Functions

 queue_base (size_type max_size)
 The constructor that is called from derived classes.
 

Protected Attributes

size_type in
 Where to input new data.
 
size_type out
 Where to get the oldest data.
 
size_type current_size
 The number of items in the queue.
 
const size_type MAX_SIZE
 The maximum number of items in the queue.
 

Detailed Description

The base class for all queues.

Member Function Documentation

size_t etl::queue_base::available ( ) const
inline

Returns the remaining capacity.

Returns
The remaining capacity.
bool etl::queue_base::empty ( ) const
inline

Checks to see if the queue is empty.

Returns
true if the queue is empty, otherwise false
bool etl::queue_base::full ( ) const
inline

Checks to see if the queue is full.

Returns
true if the queue is full, otherwise false
void etl::queue_base::pop ( )
inline

Removes the oldest item from the back of the queue. Does nothing if the queue is already empty.


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