Gel2D - The free/open source game creation suite

Public Member Functions
gel::GelQueue< dType > Class Template Reference

Queue template. More...

#include <gelQueue.h>

Inheritance diagram for gel::GelQueue< dType >:
gel::GelLinkedList< dType >

List of all members.

Public Member Functions

 GelQueue ()
 Default constructor.
 ~GelQueue ()
 Destructor.
void enqueue (const dType &item)
 Adds an item to the tail of the queue.
dType dequeue ()
 Removes the item at the head of the queue and returns it.
dType peek ()
 Gets the item at the head of the queue.
const dType peek () const
 Gets the item at the head of the queue.

Detailed Description

template<class dType>
class gel::GelQueue< dType >

Queue template.


Constructor & Destructor Documentation

template<class dType >
gel::GelQueue< dType >::GelQueue ( ) [inline]

Default constructor.

Constructs an empty queue.

template<class dType >
gel::GelQueue< dType >::~GelQueue ( ) [inline]

Destructor.


Member Function Documentation

template<class dType >
void gel::GelQueue< dType >::enqueue ( const dType &  item) [inline]

Adds an item to the tail of the queue.

Parameters:
item: The item to add.
template<class dType >
dType gel::GelQueue< dType >::dequeue ( ) [inline]

Removes the item at the head of the queue and returns it.

Returns:
The head item in the queue.
template<class dType >
dType gel::GelQueue< dType >::peek ( ) [inline]

Gets the item at the head of the queue.

Returns:
The head item in the queue.
template<class dType >
const dType gel::GelQueue< dType >::peek ( ) const [inline]

Gets the item at the head of the queue.

This is an overloaded function.


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