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

UStack Class Reference

Ultralightweight C++ implementation of a void* stack that is (mostly) compatible with java.util.Stack. More...

#include <uvector.h>

Inheritance diagram for UStack:

UVector List of all members.

Public Methods

 UStack (int32_t initialCapacity = 8)
 UStack (Deleter d, Comparer c, int32_t initialCapacity = 8)
UBool empty (void) const
void* peek (void) const
void* pop (void)
void* push (void* obj)
int32_t search (void* obj) const

Detailed Description

Ultralightweight C++ implementation of a void* stack that is (mostly) compatible with java.util.Stack.

As in java, this is merely a paper thin layer around UVector. See the UVector documentation for further information.

Design notes

The element at index n-1 is (of course) the top of the stack.

The poorly named empty() method doesn't empty the stack; it determines if the stack is empty.

Author(s):
Alan Liu

Definition at line 174 of file uvector.h.


Constructor & Destructor Documentation

UStack::UStack ( int32_t initialCapacity = 8 )
 

UStack::UStack ( Deleter d,
Comparer c,
int32_t initialCapacity = 8 )
 


Member Function Documentation

UBool UStack::empty ( void ) const [inline]
 

Definition at line 230 of file uvector.h.

void * UStack::peek ( void ) const [inline]
 

Definition at line 234 of file uvector.h.

void* UStack::pop ( void )
 

void * UStack::push ( void * obj ) [inline]
 

Definition at line 238 of file uvector.h.

int32_t UStack::search ( void * obj ) const
 


The documentation for this class was generated from the following file:
Generated at Tue Dec 5 17:56:35 2000 for ICU by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000