#include <ngscan.h>
Inheritance diagram for CreateDisplayScan::DelItemIfUnref:
Private Member Functions | |
virtual BOOL | Do (SGNameItem *) |
Deletes the names of items which no longer refer to any objects. |
Definition at line 426 of file ngscan.h.
|
Deletes the names of items which no longer refer to any objects.
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 }
|