Class hierarchy Compound list File list Compound Members File Members
Stack Class Reference
A classic LIFO data structure. More...
Inherited by Queue.
List of all members.
Public Members
- DS_BOOL empty ()
- Returns non-zero if the stack is empty.
- Data peek ()
- Returns the top element in the stack.
- Data top ()
- Returns the top element in the stack.
- Data pop ()
- Returns the top element in the stack and remove it.
- void push (Data Item)
- Push an item to the top of the stack.
- Data search (Data Item)
- Search for an item by utilizing the equality function of Containable.
Detailed Description
A classic LIFO data structure.
Member Function Documentation
DS_BOOL Stack::empty()
Returns non-zero if the stack is empty.
Data Stack::peek()
Returns the top element in the stack.
Reimplemented in Queue.
Data Stack::top()
Returns the top element in the stack.
Data Stack::pop()
Returns the top element in the stack and remove it.
Note: pop() returns garbage in a destructive stack.
Reimplemented in Queue.
void Stack::push(Data Item)
Push an item to the top of the stack.
Data Stack::search(Data Item)
Search for an item by utilizing the equality function of Containable.
The documentation for this class was generated from the following file: