#include <undoop.h>
Inheritance diagram for ObjectSet:
Public Member Functions | |
ObjectSet * | CopySet () |
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 () |
Definition at line 142 of file undoop.h.
|
Definition at line 155 of file undoop.h. 00155 { DeleteAll(); };
|
|
|
|
Makes a copy of the object set.
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 }
|
|
To determine if pObject is in the set.
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 }
|