InsertLevelStack Class Reference

Holds a list of level items The class gives the list a stack-like interface. More...

#include <cxflists.h>

Inheritance diagram for InsertLevelStack:

List CCObject SimpleCCObject List of all members.

Public Member Functions

 InsertLevelStack ()
 The default constructor.
 ~InsertLevelStack ()
 The default destructor - deletes all the list's items.
void Add (InsertLevelStackItem *pItem)
 Adds the item to the top of the stack.
InsertLevelStackItemGet ()
 Returns a ptr to the item on the top of the stack, without removing it.
InsertLevelStackItemPop ()
 Removes the item from the top of the stack, and returns a ptr to it.

Private Attributes

UINT32 InsertLevel

Detailed Description

Holds a list of level items The class gives the list a stack-like interface.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/9/96
Each item holds info on a particular level during import.

The list is actually treated as a stack, where the tail item is the item on the top of the stack, and items are only added and removed from the tail of the list

Definition at line 374 of file cxflists.h.


Constructor & Destructor Documentation

InsertLevelStack::InsertLevelStack  ) 
 

The default constructor.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/9/96
Parameters:
- [INPUTS]
Returns:
-

Definition at line 270 of file cxflists.cpp.

00271 {
00272     InsertLevel = 0;
00273 }

InsertLevelStack::~InsertLevelStack  ) 
 

The default destructor - deletes all the list's items.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/9/96
Parameters:
- [INPUTS]
Returns:
-

Definition at line 287 of file cxflists.cpp.

00288 {
00289     DeleteAll();
00290 }


Member Function Documentation

void InsertLevelStack::Add InsertLevelStackItem pItem  ) 
 

Adds the item to the top of the stack.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/9/96
Parameters:
pItem [INPUTS]
Returns:
-

Definition at line 304 of file cxflists.cpp.

00305 {
00306     InsertLevel++;
00307     AddTail(pItem);
00308 }

InsertLevelStackItem * InsertLevelStack::Get  ) 
 

Returns a ptr to the item on the top of the stack, without removing it.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/9/96
Parameters:
- [INPUTS]
Returns:
ptr to a InsertLevelStackItem

Definition at line 322 of file cxflists.cpp.

00323 {
00324     return (InsertLevelStackItem*)List::GetTail();
00325 }

InsertLevelStackItem * InsertLevelStack::Pop  ) 
 

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

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/9/96
Parameters:
- [INPUTS]
Returns:
ptr to a InsertLevelStackItem

Definition at line 339 of file cxflists.cpp.

00340 {
00341     if (InsertLevel == 0)
00342     {
00343         ERROR3("InsertLevel == 0");
00344         return NULL;
00345     }
00346 
00347     InsertLevel--;
00348 
00349     return (InsertLevelStackItem*)List::RemoveTail();
00350 }


Member Data Documentation

UINT32 InsertLevelStack::InsertLevel [private]
 

Definition at line 387 of file cxflists.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:30 2007 for Camelot by  doxygen 1.4.4