#include <blndtool.h>
Inheritance diagram for CompoundNodeTreeFactoryList:
Public Member Functions | |
~CompoundNodeTreeFactoryList () | |
Deletes the list. | |
void | AddItem (CompoundNodeTreeFactory *pItem) |
Adds an item to the list - but won't add 2 items of the same kind ! | |
CompoundNodeTreeFactory * | GetItem (INT32 index) |
Adds an item to the list - but won't add 2 items of the same kind ! |
Definition at line 166 of file blndtool.h.
|
Deletes the list.
Definition at line 8705 of file blndtool.cpp. 08706 { 08707 CompoundNodeTreeFactoryListItem * pItem = (CompoundNodeTreeFactoryListItem *)GetHead(); 08708 08709 while (pItem) 08710 { 08711 delete pItem->pFactory; 08712 pItem->pFactory = NULL; 08713 08714 pItem = (CompoundNodeTreeFactoryListItem *)GetNext(pItem); 08715 } 08716 08717 List::DeleteAll(); 08718 }
|
|
Adds an item to the list - but won't add 2 items of the same kind !
Definition at line 8735 of file blndtool.cpp. 08736 { 08737 // find out if any element in the list matches this type - if so, don't add it ! 08738 BOOL bAdd = TRUE; 08739 08740 CompoundNodeTreeFactoryListItem * pListItem = (CompoundNodeTreeFactoryListItem *)GetHead(); 08741 08742 while (pListItem && bAdd) 08743 { 08744 if (pListItem->pFactory->GetRuntimeClass() == pItem->GetRuntimeClass()) 08745 { 08746 bAdd = FALSE; 08747 } 08748 08749 pListItem = (CompoundNodeTreeFactoryListItem *)GetNext(pListItem); 08750 } 08751 08752 if (bAdd) 08753 { 08754 pListItem = new CompoundNodeTreeFactoryListItem; 08755 pListItem->pFactory = pItem; 08756 AddTail(pListItem); 08757 } 08758 }
|
|
Adds an item to the list - but won't add 2 items of the same kind !
Definition at line 8774 of file blndtool.cpp. 08775 { 08776 if( index >= INT32(GetCount()) ) 08777 return NULL; 08778 08779 CompoundNodeTreeFactoryListItem * pItem = (CompoundNodeTreeFactoryListItem *)GetHead(); 08780 08781 for (INT32 i = 0 ; i < index; i++) 08782 { 08783 pItem = (CompoundNodeTreeFactoryListItem *)GetNext(pItem); 08784 } 08785 08786 return pItem->pFactory; 08787 }
|