ObjectSet Class Reference

A set of NodeRenderableInk objects. More...

#include <undoop.h>

Inheritance diagram for ObjectSet:

List CCObject SimpleCCObject List of all members.

Public Member Functions

ObjectSetCopySet ()
 Makes a copy of the object set.
virtual BOOL AddToSet (NodeRenderableInk *pObject)
BOOL InSet (NodeRenderableInk *pObject)
 To determine if pObject is in the set.
 ~ObjectSet ()

Detailed Description

A set of NodeRenderableInk objects.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/95
See also:
ObjectItem

Definition at line 142 of file undoop.h.


Constructor & Destructor Documentation

ObjectSet::~ObjectSet  )  [inline]
 

Definition at line 155 of file undoop.h.

00155 { DeleteAll(); };


Member Function Documentation

virtual BOOL ObjectSet::AddToSet NodeRenderableInk pObject  )  [virtual]
 

ObjectSet * ObjectSet::CopySet  ) 
 

Makes a copy of the object set.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
A copy of the set, or NULL if we run out of memory

Errors: -

See also:
ObjectSet::AddToSet

ObjectSet::InSet

Definition at line 214 of file undoop.cpp.

00215 {
00216     ObjectSet* pSetCopy; 
00217     pSetCopy = new ObjectSet;
00218     if (!pSetCopy)
00219         return NULL; // Out of memory
00220 
00221     // Copy each item in turn
00222     ObjectItem* pItemCopy;
00223     ObjectItem* pCurrent = (ObjectItem*)GetHead(); 
00224     while (pCurrent)
00225     {
00226         pItemCopy = new ObjectItem;
00227         if (!pItemCopy)
00228         {
00229             // Tidyup
00230             pSetCopy->DeleteAll();
00231             delete pSetCopy;
00232             return NULL;  
00233         }
00234         pItemCopy->pObject = pCurrent->pObject;
00235         pSetCopy->AddTail(pItemCopy); 
00236         pCurrent = (ObjectItem*)GetNext(pCurrent);  
00237     }
00238     return pSetCopy;
00239 }

BOOL ObjectSet::InSet NodeRenderableInk pObject  ) 
 

To determine if pObject is in the set.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/95
Parameters:
pObject,: A pointer to an object [INPUTS]
- [OUTPUTS]
Returns:
TRUE if pObject is in the set

Errors: -

See also:
ObjectSet::CopySet

ObjectSet::AddToSet

Definition at line 258 of file undoop.cpp.

00259 {
00260     ObjectItem* pCurrent = (ObjectItem*)GetHead(); 
00261     while (pCurrent)
00262     {
00263         if (pCurrent->pObject == pObject)
00264             return TRUE; 
00265         pCurrent = (ObjectItem*)GetNext(pCurrent);  
00266     }
00267     return FALSE; 
00268 }         


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