CreateDisplayScan::DelItemIfUnref Class Reference

#include <ngscan.h>

Inheritance diagram for CreateDisplayScan::DelItemIfUnref:

NameItemIter List of all members.

Private Member Functions

virtual BOOL Do (SGNameItem *)
 Deletes the names of items which no longer refer to any objects.

Detailed Description

Definition at line 426 of file ngscan.h.


Member Function Documentation

BOOL CreateDisplayScan::DelItemIfUnref::Do SGNameItem pItem  )  [private, virtual]
 

Deletes the names of items which no longer refer to any objects.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/5/99
Parameters:
pItem --- current item in the iteration [INPUTS]

Implements NameItemIter.

Definition at line 1353 of file ngscan.cpp.

01354 {
01355     // Basic integrity checks for the number of objects & nodes encountered.
01356     ERROR3IF(pItem->GetNodeCount() < pItem->GetObjectCount(),
01357                 "CreateDisplayScan::DelItemIfNoRef::Do: nodes < objects");
01358     ERROR3IF(pItem->GetNodeCount() > pItem->GetObjectCount() + 1,
01359                 "CreateDisplayScan::DelItemIfNoRef::Do: nodes > objects + 1");
01360     ERROR3IF(pItem->GetSelectedCount() > pItem->GetObjectCount(),
01361                 "CreateDisplayScan::DelItemIfNoRef::Do: selected > objects");
01362 
01363     // Does the item's set not contain any objects?
01364     if (pItem->GetNodeCount() == 0)
01365     {
01366         pItem->RemoveFromTree();
01367         delete pItem;
01368     }
01369 
01370     // 'Decimate the contentless 'til the bitter end', sayeth Tiberius.
01371     return TRUE;
01372 }


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