Main Page   Class Hierarchy   Compound List   File List   Compound Members  

SparingStack< value_type, elementsPerBlock, noOfBlocks > Class Template Reference

A stack which stores its elements in blocks which are managed by a CommonPoolOfBlocks. More...

#include <sparingStack.h>

List of all members.

Public Methods

 SparingStack ()
 The default constructor.

 ~SparingStack ()
 The destructor.

void setPool (Pool *pool)
 Sets the CommonPoolOfBlocks which should be used.

bool empty () const
 Returns true iff the stack is empty.

void push (const value_type &element)
 Adds an element to the stack.

const value_type & top () const
 Returns a reference to the last element.

void pop ()
 Removes the last element.

int size () const
 Returns the number of elements which are stored in the stack.


Protected Types

typedef CommonPoolOfBlocks<
value_type, elementsPerBlock,
noOfBlocks > 
Pool
 The type of the used CommonPoolOfBlocks.

typedef Pool::Block Block
 The type of a Block which stores several elements.


Protected Attributes

Pool_pool
 A pointer to the used CommonPoolOfBlocks.

Block_top
 A pointer to the list of blocks which store the elements.

Block _bottom
 The bottom block which belongs to the stack.


Detailed Description

template<typename value_type, int elementsPerBlock, int noOfBlocks>
class SparingStack< value_type, elementsPerBlock, noOfBlocks >

A stack which stores its elements in blocks which are managed by a CommonPoolOfBlocks.

Definition at line 210 of file sparingStack.h.


Member Function Documentation

template<typename value_type, int elementsPerBlock, int noOfBlocks>
void SparingStack< value_type, elementsPerBlock, noOfBlocks >::setPool Pool   pool [inline]
 

Sets the CommonPoolOfBlocks which should be used.

This method must be called after the object has been created and before it is used.

Definition at line 237 of file sparingStack.h.


The documentation for this class was generated from the following file:
Generated on Thu Aug 14 15:13:28 2003 for External Memory Minimum Spanning Trees by doxygen1.2.17