Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

simple_stack Class Reference

A very simple stack class. More...

#include <simple_stack.h>

Inheritance diagram for simple_stack:

ref_stack SymbolList List of all members.

Public Methods

 simple_stack (unsigned int start_size = 10, unsigned int expansion_size = 10)
 simple_stack (const simple_stack &y)
virtual ~simple_stack ()
simple_stack& operator= (const simple_stack &y)
void freeze ()
x* get () const
x* get_copy () const
void reset ()
void push (x ch)
pop ()
x& top ()
int len () const
x& operator[] (int i) const
void set_len (int newlen)
void cut (int len)
void remove (int p)
void expand (int by)
void set_expansion (int i)
int get_buf_len ()


Detailed Description

template<class x> class simple_stack

A very simple stack class.

Bugs and limitations:
The origins of this class predate STL, so it is not STL compatible.


Constructor & Destructor Documentation

template<class x>
simple_stack<x>::simple_stack<x> (
unsigned int start_size = 10,
unsigned int expansion_size = 10)

template<class x>
simple_stack<x>::simple_stack<x> (
const simple_stack<x> & y)

template<class x>
simple_stack<x>::~simple_stack<x> () [inline, virtual]


Member Function Documentation

template<class x>
void simple_stack<x>::cut (
int len) [inline]

Reimplemented in ref_stack.

template<class x>
void simple_stack<x>::expand (
int by) [inline]

template<class x>
void simple_stack<x>::freeze () [inline]

template<class x>
x * simple_stack<x>::get (
void) const [inline]

template<class x>
int simple_stack<x>::get_buf_len () [inline]

template<class x>
x * simple_stack<x>::get_copy () const [inline]

template<class x>
int simple_stack<x>::len () const [inline]

template<class x>
simple_stack<x> & simple_stack<x>::operator= (
const simple_stack<x> & y) [inline]

template<class x>
x & simple_stack<x>::operator[] (
int i) const [inline]

template<class x>
x simple_stack<x>::pop (
void) [inline]

Reimplemented in ref_stack.

template<class x>
void simple_stack<x>::push (
x ch) [inline]

template<class x>
void simple_stack<x>::remove (
int p) [inline]

Reimplemented in ref_stack.

template<class x>
void simple_stack<x>::reset () [inline]

Reimplemented in ref_stack.

template<class x>
void simple_stack<x>::set_expansion (
int i) [inline]

template<class x>
void simple_stack<x>::set_len (
int newlen) [inline]

Reimplemented in ref_stack.

template<class x>
x & simple_stack<x>::top () [inline]


The documentation for this class was generated from the following file:
Generated at Mon Jul 31 13:44:31 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000