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

ref_stack Class Reference

\template ref_stack. More...

#include <ref_counter.h>

Inheritance diagram for ref_stack:

simple_stack List of all members.

Public Methods

 ref_stack (unsigned int start_size = 10, unsigned int expansion_size = 10)
void reset ()
void set_len (int newlen)
void cut (int len)
void remove (int p)
pop ()


Detailed Description

template<class x> class ref_stack

\template ref_stack.

A stack for use with reference counted objects The template parameter is the RCPointer class, not the class being reference counted.

Warning:
{ This class is needed to actually remove the references from the stack when they are not logically present. If you used a simple stack with such pointers, objects would hang around because there would still be references on the stack, even though they had been popped.


Constructor & Destructor Documentation

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


Member Function Documentation

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

Reimplemented from simple_stack.

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

Reimplemented from simple_stack.

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

Reimplemented from simple_stack.

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

Reimplemented from simple_stack.

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

Reimplemented from simple_stack.


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