SGQueue< T > Class Template Reference

SGQueue defines an interface for a FIFO. More...

#include <SGQueue.hxx>

Inheritance diagram for SGQueue< T >:
SGBlockingQueue< T > SGLockedQueue< T, SGLOCK >

List of all members.

Public Member Functions

 SGQueue ()
 Create a new SGQueue object.
virtual ~SGQueue ()
 Destroy this object.
virtual bool empty ()=0
 Returns whether this queue is empty (contains no elements).
virtual void push (const T &item)=0
 Add an item to the end of the queue.
virtual T front ()=0
 View the item from the head of the queue.
virtual T pop ()=0
 Get an item from the head of the queue.
virtual size_t size ()=0
 Query the size of the queue.

Detailed Description

template<class T>
class SGQueue< T >

SGQueue defines an interface for a FIFO.

It can be implemented using different types of synchronization and protection.

Definition at line 18 of file SGQueue.hxx.


Member Function Documentation

template<class T >
virtual bool SGQueue< T >::empty (  )  [pure virtual]

Returns whether this queue is empty (contains no elements).

Returns:
bool True if queue is empty, otherwisr false.

Implemented in SGLockedQueue< T, SGLOCK >, and SGBlockingQueue< T >.

template<class T >
virtual T SGQueue< T >::front (  )  [pure virtual]

View the item from the head of the queue.

Returns:
T next available object.

Implemented in SGLockedQueue< T, SGLOCK >, and SGBlockingQueue< T >.

template<class T >
virtual T SGQueue< T >::pop (  )  [pure virtual]

Get an item from the head of the queue.

Returns:
T next available object.

Implemented in SGLockedQueue< T, SGLOCK >, and SGBlockingQueue< T >.

template<class T >
virtual void SGQueue< T >::push ( const T &  item  )  [pure virtual]

Add an item to the end of the queue.

Parameters:
T object to add.

Implemented in SGLockedQueue< T, SGLOCK >, and SGBlockingQueue< T >.

template<class T >
virtual size_t SGQueue< T >::size (  )  [pure virtual]

Query the size of the queue.

Returns:
size_t size of queue.

Implemented in SGLockedQueue< T, SGLOCK >, and SGBlockingQueue< T >.


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

Generated on 23 Feb 2010 for SimGear by  doxygen 1.6.1