text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

Stack Class Reference

#include <StackL.h>

List of all members.


Detailed Description

ADT stack - ADT list implementation.

Definition at line 24 of file StackL.h.

Public Member Functions

 Stack ()
 Stack (const Stack &aStack)
 ~Stack ()
bool isEmpty () const
void push (const StackItemType &newItem) throw (StackException)
void pop () throw (StackException)
void pop (StackItemType &stackTop) throw (StackException)
void getTop (StackItemType &stackTop) const throw (StackException)

Private Attributes

List aList


Constructor & Destructor Documentation

Stack::Stack  ) 
 

Default constructor.

Definition at line 19 of file StackL.cpp.

Stack::Stack const Stack aStack  ) 
 

Copy constructor.

Definition at line 23 of file StackL.cpp.

Stack::~Stack  ) 
 

Destructor.

Definition at line 28 of file StackL.cpp.


Member Function Documentation

bool Stack::isEmpty  )  const
 

Definition at line 32 of file StackL.cpp.

References aList, and List::isEmpty().

void Stack::push const StackItemType newItem  )  throw (StackException)
 

Definition at line 37 of file StackL.cpp.

void Stack::pop  )  throw (StackException)
 

Definition at line 54 of file StackL.cpp.

References aList, and List::remove().

void Stack::pop StackItemType stackTop  )  throw (StackException)
 

Definition at line 66 of file StackL.cpp.

void Stack::getTop StackItemType stackTop  )  const throw (StackException)
 

Definition at line 79 of file StackL.cpp.


Member Data Documentation

List Stack::aList [private]
 

List of stack items.

Definition at line 44 of file StackL.h.

Referenced by isEmpty(), and pop().


The documentation for this class was generated from the following files:

Generated on Sun Aug 27 16:41:20 2006 for AWLogo by  doxygen 1.4.6