name: Stack<class TObject>: public DstrBase <TObject>

synopsis:

g++ [flags ...] file ...

#include <Stack.h>
Stack();
boolean assign(const Stack<TObject>& copy_stack);
boolean push(TObject* item);
TObject* pop(TObject* item = (TObject*)NULL);
const TObject* peek() const;
boolean pop(Stack<TObject>& item_stack, long num_items);
boolean clear();
quick start:

// declare a character stack and push two characters into it
//
Stack<Char> stack;
Char item0(L'a');
Char item1(L'b');
stack.push(&item0);
stack.push(&item1);

// pop the top item from the stack
//
Char* item2 = new Char();
stack.pop(item2);

if(!item2->eq(item1)) {
  // error
}
description:

The Stack class is a container class that implements a standard stack (last-in, first-out) using a double linked list. For a good reference on stacks, see: This class uses the double linked list in USER mode, since this list is used to store either the actual data or a pointer to it.

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

examples:

notes: