Gel2D - The free/open source game creation suite

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

Stack template. More...

#include <gelStack.h>

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

List of all members.

Public Member Functions

 GelStack ()
 Default constructor.
 ~GelStack ()
 Destructor.
void push (const dType &item)
 Adds an item to the top of the stack.
dType pop ()
 Removes the item at the top of the stack and returns it.
dType peek ()
 Gets the item at the top of the stack.
const dType peek () const
 Gets the item at the top of the stack.

Detailed Description

template<class dType>
class gel::GelStack< dType >

Stack template.


Constructor & Destructor Documentation

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

Default constructor.

Constructs an empty stack.

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

Destructor.


Member Function Documentation

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

Adds an item to the top of the stack.

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

Removes the item at the top of the stack and returns it.

Returns:
The top item in the stack.
template<class dType >
dType gel::GelStack< dType >::peek ( ) [inline]

Gets the item at the top of the stack.

Returns:
The top item in the stack.
template<class dType >
const dType gel::GelStack< dType >::peek ( ) const [inline]

Gets the item at the top of the stack.

This is an overloaded function.


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