Stack Class Reference

A general purpose stack for storing ListItems. More...

#include <stack.h>

Inheritance diagram for Stack:

ActiveDlgStateStack List of all members.

Public Member Functions

 Stack ()
 Stack constructor.
 ~Stack ()
 Stack destructor. The items on the stack are not deleted.
void Push (ListItem *Item)
 Pushes Item onto the stack.
ListItemPop (void)
 Removes the item from the top of the stack, and returns it.
ListItemGetTop (void)
 Allows you to find out what item is on the top of the stack (the item is not removed).
INT32 Size ()
 For finding the size of the stack.
void DeleteAll ()
 Removes and deletes all items on the stack.

Private Attributes

List stack

Detailed Description

A general purpose stack for storing ListItems.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 123 of file stack.h.


Constructor & Destructor Documentation

Stack::Stack  ) 
 

Stack constructor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 130 of file stack.cpp.

00131 {
00132 }

Stack::~Stack  ) 
 

Stack destructor. The items on the stack are not deleted.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 149 of file stack.cpp.

00150 {
00151     
00152 }


Member Function Documentation

void Stack::DeleteAll  ) 
 

Removes and deletes all items on the stack.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 231 of file stack.cpp.

00232 {
00233     stack.DeleteAll(); // Call the list's DeleteAll method 
00234 }

ListItem * Stack::GetTop void   ) 
 

Allows you to find out what item is on the top of the stack (the item is not removed).

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The item at the top of the stack

Errors: -

See also:
-

Definition at line 210 of file stack.cpp.

00211 {
00212     return (stack.GetTail()); 
00213 }

ListItem * Stack::Pop void   ) 
 

Removes the item from the top of the stack, and returns it.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The top item on the stack, or NULL if the stack is empty

Errors: -

See also:
-

Definition at line 189 of file stack.cpp.

00190 {   
00191     return (stack.RemoveTail()); 
00192 }

void Stack::Push ListItem Item  ) 
 

Pushes Item onto the stack.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 169 of file stack.cpp.

00170 {
00171     stack.AddTail(Item); // Add the item to the top of the stack 
00172 }

INT32 Stack::Size  ) 
 

For finding the size of the stack.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The number of items on the stack

Errors: -

See also:
-

Definition at line 251 of file stack.cpp.

00252 {
00253     return stack.GetCount(); 
00254 }


Member Data Documentation

List Stack::stack [private]
 

Definition at line 135 of file stack.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:01:23 2007 for Camelot by  doxygen 1.4.4