Generated on Wed Jan 4 17:49:25 2006 for Gecode by doxygen 1.4.6

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

#include <static-stack.hh>

List of all members.


Detailed Description

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

Stack with fixed number of elements.

Requires

Definition at line 36 of file static-stack.hh.

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.
T pop (void)
 Pop topmost element from stack and return it.
T & top (void)
 Return element on top of stack.
T & last (void)
 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 66 of file static-stack.hh.

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

Release memory.

Definition at line 73 of file static-stack.hh.


Member Function Documentation

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

Reset stack (pop all elements).

Definition at line 85 of file static-stack.hh.

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

Test whether stack is empty.

Definition at line 79 of file static-stack.hh.

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

Pop topmost element from stack and return it.

Definition at line 91 of file static-stack.hh.

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

Return element on top of stack.

Definition at line 97 of file static-stack.hh.

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

Return element that has just been popped.

Definition at line 103 of file static-stack.hh.

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

Push element x on top of stack.

Definition at line 109 of file static-stack.hh.


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