Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

stack Template Class Reference

A stack of objects. More...

#include <type_allocator.h>

Inheritance diagram for stack:

type_allocator List of all members.

Public Types

typedef type_allocator<T,
defAlloc>::iterator 
iterator
 Better definition of iterator for subclasses.


Public Methods

 ~stack ()
 Destruction of stack invokes destroy method.

void destroy_obj ()
 Just ask base class to release storage.

void push (const T& id)
 Push specified object onto stack. More...

void pop (T& id)
 Remove last object on stack (pop from stack). More...


Friends

int operator== (const stack<T, defAlloc>& iA, const stack<T, defAlloc>& iB)
 So that type allocator lists can be part of other lists.


Detailed Description

template<class T, size_t defAlloc> template class stack

A stack of objects.

Implements push and pop operators for last in first out behavior.


Member Function Documentation

template<classT, size_tdefAlloc>
void stack<T, defAlloc>::push ( const T & id ) [inline]
 

Push specified object onto stack.

Parameters:
id   push on stack.

template<classT, size_tdefAlloc>
void stack<T, defAlloc>::pop ( T & id ) [inline]
 

Remove last object on stack (pop from stack).

Set id to the object removed from stack.

Parameters:
id   object popped from stack.


The documentation for this class was generated from the following file:
Generated at Wed Mar 2 11:18:59 2005 for Result Library by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000