Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

LinkedStack Class Reference

#include <LinkedStack.hpp>

List of all members.

Public Methods

 LinkedStack ()
virtual ~LinkedStack ()
void clear ()
void push (const Elem item)
Elem pop ()
Elem topValue () const
BOOL isEmpty () const
BOOL isFilled () const

Private Attributes

SLinktop


Constructor & Destructor Documentation

LinkedStack::LinkedStack   [inline]
 

Definition at line 9 of file LinkedStack.hpp.

00009 : top( NULL ) { }   // Default Constructor

virtual LinkedStack::~LinkedStack   [inline, virtual]
 

Definition at line 11 of file LinkedStack.hpp.

00011                                 {          // Destructor: return Elems
00012     clear();
00013   }


Member Function Documentation

void LinkedStack::clear  
 

Referenced by ~LinkedStack().

BOOL LinkedStack::isEmpty   const [inline]
 

Definition at line 30 of file LinkedStack.hpp.

00031   { 
00032     return (top == NULL);
00033   }

BOOL LinkedStack::isFilled   const [inline]
 

Definition at line 35 of file LinkedStack.hpp.

00036   {
00037     return (top != NULL);
00038   }

Elem LinkedStack::pop  
 

void LinkedStack::push const Elem    item [inline]
 

Definition at line 17 of file LinkedStack.hpp.

00018   {
00019     top = new SLink( item, top );
00020   }

Elem LinkedStack::topValue   const [inline]
 

Definition at line 24 of file LinkedStack.hpp.

00025   {
00026     assert( !isEmpty() );
00027     return top->element;
00028   }


Member Data Documentation

SLink* LinkedStack::top [private]
 

Definition at line 41 of file LinkedStack.hpp.


The documentation for this class was generated from the following file:
Generated on Sun Oct 14 18:49:13 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001