InsertLevelStackItem Class Reference

This item holds all the info for a given insert level of the tree. It is used when building the tree on import. More...

#include <cxflists.h>

Inheritance diagram for InsertLevelStackItem:

ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 InsertLevelStackItem (BaseCamelotFilter *pFilter)
 The default constructor.
UINT32 GetNumNodesInserted ()
BOOL SetLastInsertedNode (Node *pNode)
 Sets the last inserted node of this tree.
NodeGetLastInsertedNode ()
void SetLastHandler (CXaraFileRecordHandler *pHandler, UINT32 Tag)
CXaraFileRecordHandlerGetLastHandler ()
UINT32 GetLastHandledTag ()
BOOL InformLastInsertedNodeChildrenComplete ()
 Tells the last inserted node that its children are complete.

Private Member Functions

 CC_DECLARE_MEMDUMP (InsertLevelStackItem)
void IncNumNodesInserted ()

Private Attributes

UINT32 NumNodesInserted
NodepLastInsertedNode
CXaraFileRecordHandlerpLastHandler
UINT32 LastHandledTag
BaseCamelotFilterpFilter
BOOL LastNodeInformedChildrenComplete

Detailed Description

This item holds all the info for a given insert level of the tree. It is used when building the tree on import.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/6/96
Use it on conjunction with the InsertLevelStack class

Definition at line 328 of file cxflists.h.


Constructor & Destructor Documentation

InsertLevelStackItem::InsertLevelStackItem BaseCamelotFilter pThisFilter  ) 
 

The default constructor.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/9/96
Parameters:
pThisFilter = ptr to the filter this item is used by [INPUTS]
Returns:
-

Definition at line 182 of file cxflists.cpp.

00183 { 
00184     NumNodesInserted    = 0; 
00185     pLastInsertedNode   = NULL; 
00186     pLastHandler        = NULL; 
00187     LastHandledTag      = TAG_UNDEFINED;
00188     pFilter             = pThisFilter;
00189     LastNodeInformedChildrenComplete = FALSE;
00190 
00191     ERROR3IF(pFilter == NULL,"pFilter is NULL");
00192 }


Member Function Documentation

InsertLevelStackItem::CC_DECLARE_MEMDUMP InsertLevelStackItem   )  [private]
 

UINT32 InsertLevelStackItem::GetLastHandledTag  )  [inline]
 

Definition at line 343 of file cxflists.h.

00343 { return LastHandledTag; }

CXaraFileRecordHandler* InsertLevelStackItem::GetLastHandler  )  [inline]
 

Definition at line 342 of file cxflists.h.

00342 { return pLastHandler; }

Node* InsertLevelStackItem::GetLastInsertedNode  )  [inline]
 

Definition at line 339 of file cxflists.h.

00339 { return pLastInsertedNode; }

UINT32 InsertLevelStackItem::GetNumNodesInserted  )  [inline]
 

Definition at line 336 of file cxflists.h.

00336 { return NumNodesInserted; }

void InsertLevelStackItem::IncNumNodesInserted  )  [inline, private]
 

Definition at line 348 of file cxflists.h.

00348 { NumNodesInserted++; }

BOOL InsertLevelStackItem::InformLastInsertedNodeChildrenComplete  ) 
 

Tells the last inserted node that its children are complete.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/9/96
Parameters:
- [INPUTS]
Returns:
TRUE if ok, FALSE if a failure has ocurred

Definition at line 239 of file cxflists.cpp.

00240 {
00241     ERROR3IF(pFilter == NULL,"pFilter is NULL");
00242 
00243     if (!LastNodeInformedChildrenComplete && pLastInsertedNode != NULL && pFilter != NULL)
00244     {
00245         if (!pFilter->ReadPostChildren(pLastInsertedNode))
00246             return FALSE;
00247 
00248         LastNodeInformedChildrenComplete = TRUE;
00249     }
00250 
00251     return TRUE;
00252 }

void InsertLevelStackItem::SetLastHandler CXaraFileRecordHandler pHandler,
UINT32  Tag
[inline]
 

Definition at line 341 of file cxflists.h.

00341 { pLastHandler = pHandler; LastHandledTag = Tag; }

BOOL InsertLevelStackItem::SetLastInsertedNode Node pNode  ) 
 

Sets the last inserted node of this tree.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/9/96
Parameters:
pNode = ptr to node just inserted into the tree [INPUTS]
Returns:
TRUE if ok, FALSE if a failure has ocurred

Definition at line 206 of file cxflists.cpp.

00207 {
00208     ERROR3IF(pNode == NULL,"pNode is NULL");
00209 
00210     if (pNode != NULL)
00211     {
00212         if (pNode->FindPrevious() == pLastInsertedNode)
00213         {
00214             if (!InformLastInsertedNodeChildrenComplete())
00215                 return FALSE;
00216         }
00217 
00218         pLastInsertedNode = pNode;
00219         LastNodeInformedChildrenComplete = FALSE;
00220 
00221         IncNumNodesInserted();          // Inc the number of nodes on this level
00222     }
00223 
00224     return TRUE;
00225 }


Member Data Documentation

UINT32 InsertLevelStackItem::LastHandledTag [private]
 

Definition at line 353 of file cxflists.h.

BOOL InsertLevelStackItem::LastNodeInformedChildrenComplete [private]
 

Definition at line 355 of file cxflists.h.

UINT32 InsertLevelStackItem::NumNodesInserted [private]
 

Definition at line 350 of file cxflists.h.

BaseCamelotFilter* InsertLevelStackItem::pFilter [private]
 

Definition at line 354 of file cxflists.h.

CXaraFileRecordHandler* InsertLevelStackItem::pLastHandler [private]
 

Definition at line 352 of file cxflists.h.

Node* InsertLevelStackItem::pLastInsertedNode [private]
 

Definition at line 351 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