CompoundNodeTreeFactoryList Class Reference

A list of the compound node factories necessary to regenerate the shadow/ bevels/other compound nodes after bevelling. More...

#include <blndtool.h>

Inheritance diagram for CompoundNodeTreeFactoryList:

List CCObject SimpleCCObject List of all members.

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 !
CompoundNodeTreeFactoryGetItem (INT32 index)
 Adds an item to the list - but won't add 2 items of the same kind !

Detailed Description

A list of the compound node factories necessary to regenerate the shadow/ bevels/other compound nodes after bevelling.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/99

Definition at line 166 of file blndtool.h.


Constructor & Destructor Documentation

CompoundNodeTreeFactoryList::~CompoundNodeTreeFactoryList  ) 
 

Deletes the list.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com> Mc
Date:
9/8/99
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:

Errors: -

See also:
Action::Init()

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 }


Member Function Documentation

void CompoundNodeTreeFactoryList::AddItem CompoundNodeTreeFactory pItem  ) 
 

Adds an item to the list - but won't add 2 items of the same kind !

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com> Mc
Date:
9/8/99
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:

Errors: -

See also:
Action::Init()

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 }

CompoundNodeTreeFactory * CompoundNodeTreeFactoryList::GetItem INT32  index  ) 
 

Adds an item to the list - but won't add 2 items of the same kind !

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com> Mc
Date:
9/8/99
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:

Errors: -

See also:
Action::Init()

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 }


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