SimpleStack class documentation

Authors

Generated by rh

Software documentation for the SimpleStack class

SimpleStack : NSObject

Declared in:
SimpleStack.h
A simple stack class using NSMutableArray

Instance Variables

Method summary

dealloc 

- (void) dealloc;
release references and deallocate memory

init 

- (id) init;
default stack initialiser

isEmpty 

- (BOOL) isEmpty;
return YES if the stack is empty

peekObject 

- (id) peekObject;
return the element at the top of the stack without removing it

popObject 

- (id) popObject;
pop an object off the stack

pushObject: 

- (id) pushObject: (id)object;
push an object onto the stack

swapTopMostObjects 

- (id) swapTopMostObjects;
swap the two elements at the top of the stack



Instance Variables for SimpleStack Class

elements

@protected NSMutableArray* elements;
elements held by the stack