#include <filters.h>
Inheritance diagram for SnapShotItem:
Public Member Functions | |
SnapShotItem () | |
Construct a SnapShotItem to record a list of current attributes. | |
~SnapShotItem () | |
Destroy a SnapShotItem - removes all allocated arrays. | |
INT32 | Initialise (AttributeEntry *CurrAttrs) |
This function grabs a snap shot of the described attributes list. | |
Private Member Functions | |
CC_DECLARE_MEMDUMP (SnapShotItem) | |
Private Attributes | |
NodeAttribute ** | SnapShotAttrs |
AttributeEntry * | SnapShotAttrsStack |
Friends | |
class | SnapShotList |
Definition at line 325 of file filters.h.
|
Construct a SnapShotItem to record a list of current attributes.
Definition at line 5475 of file filters.cpp. 05476 { 05477 SnapShotAttrs = NULL; 05478 SnapShotAttrsStack = NULL; 05479 }
|
|
Destroy a SnapShotItem - removes all allocated arrays.
Definition at line 5494 of file filters.cpp. 05495 { 05496 if (SnapShotAttrs!=NULL) 05497 { 05498 INT32 i, NumAttrs = AttributeManager::GetNumAttributes(); 05499 for (i=0; i<NumAttrs; i++) 05500 { 05501 if (SnapShotAttrs[i] != NULL) 05502 { 05503 delete SnapShotAttrs[i]; 05504 SnapShotAttrs[i]=NULL; 05505 } 05506 } 05507 CCFree(SnapShotAttrs); 05508 SnapShotAttrs=NULL; 05509 } 05510 05511 if (SnapShotAttrsStack!=NULL) 05512 { 05513 CCFree(SnapShotAttrsStack); 05514 SnapShotAttrsStack=NULL; 05515 } 05516 }
|
|
|
|
This function grabs a snap shot of the described attributes list.
Definition at line 5533 of file filters.cpp. 05534 { 05535 INT32 i, NumAttrs = AttributeManager::GetNumAttributes(); 05536 05537 SnapShotAttrs = (NodeAttribute**)CCMalloc(NumAttrs*sizeof(NodeAttribute*)); 05538 if (SnapShotAttrs==NULL) 05539 return FALSE; 05540 05541 SnapShotAttrsStack = (AttributeEntry*)CCMalloc(NumAttrs*sizeof(AttributeEntry)); 05542 if (SnapShotAttrsStack==NULL) 05543 { 05544 CCFree(SnapShotAttrs); 05545 SnapShotAttrs=NULL; 05546 return FALSE; 05547 } 05548 05549 // store the temp values 05550 for (i=0; i<NumAttrs; i++) 05551 { 05552 // of course the following MakeNode may fail, but it just sets 05553 // the SnapShotAttrs ptr to NULL which we MUST check (and do) later on 05554 SnapShotAttrs[i] = (CurrAttrs[i].pAttr)->MakeNode(); 05555 05556 SnapShotAttrsStack[i].pAttr = NULL; 05557 SnapShotAttrsStack[i].Temp = FALSE; 05558 SnapShotAttrsStack[i].Ignore = TRUE; 05559 } 05560 05561 return TRUE; 05562 }
|
|
|
|
|
|
|