Generated on Mon Aug 25 11:35:54 2008 for Gecode by doxygen 1.5.6

Gecode::Support::StaticStack< T > Class Template Reference
[Support algorithms and datastructures]

List of all members.


Detailed Description

template<class T>
class Gecode::Support::StaticStack< T >

Stack with fixed number of elements.

Definition at line 46 of file static-stack.icc.


Public Member Functions

 StaticStack (const int n)
 Initialize for n elements.
 ~StaticStack (void)
 Release memory.
void reset (void)
 Reset stack (pop all elements).
bool empty (void) const
 Test whether stack is empty.
pop (void)
 Pop topmost element from stack and return it.
T & top (void) const
 Return element on top of stack.
T & last (void) const
 Return element that has just been popped.
void push (T x)
 Push element x on top of stack.

Constructor & Destructor Documentation

template<class T>
Gecode::Support::StaticStack< T >::StaticStack ( const int  n  )  [inline]

Initialize for n elements.

Definition at line 76 of file static-stack.icc.

template<class T>
Gecode::Support::StaticStack< T >::~StaticStack ( void   )  [inline]

Release memory.

Definition at line 83 of file static-stack.icc.


Member Function Documentation

template<class T>
void Gecode::Support::StaticStack< T >::reset ( void   )  [inline]

Reset stack (pop all elements).

Definition at line 95 of file static-stack.icc.

template<class T>
bool Gecode::Support::StaticStack< T >::empty ( void   )  const [inline]

Test whether stack is empty.

Definition at line 89 of file static-stack.icc.

template<class T>
T Gecode::Support::StaticStack< T >::pop ( void   )  [inline]

Pop topmost element from stack and return it.

Definition at line 101 of file static-stack.icc.

template<class T>
T & Gecode::Support::StaticStack< T >::top ( void   )  const [inline]

Return element on top of stack.

Definition at line 107 of file static-stack.icc.

template<class T>
T & Gecode::Support::StaticStack< T >::last ( void   )  const [inline]

Return element that has just been popped.

Definition at line 113 of file static-stack.icc.

template<class T>
void Gecode::Support::StaticStack< T >::push ( x  )  [inline]

Push element x on top of stack.

Definition at line 119 of file static-stack.icc.


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