CDRActionGroupEnd Class Reference

A group end. More...

#include <cdrfiltr.h>

Inheritance diagram for CDRActionGroupEnd:

CDRActionListItem ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 CDRActionGroupEnd ()
BOOL DoAction (CDRFilter *C)
 does some funcky stuff to put objects in a group
void ImportFailure (CDRFilter *C)
 ensures no memory leaks if the import fails

Private Member Functions

 CC_DECLARE_DYNAMIC (CDRActionGroupEnd)

Private Attributes

friend CDRActionList
friend CDRFilter
NodeRenderablepOldLevelNodeList

Detailed Description

A group end.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
26 03 95

Definition at line 588 of file cdrfiltr.h.


Constructor & Destructor Documentation

CDRActionGroupEnd::CDRActionGroupEnd  )  [inline]
 

Definition at line 596 of file cdrfiltr.h.

00596 {pOldLevelNodeList = 0;};


Member Function Documentation

CDRActionGroupEnd::CC_DECLARE_DYNAMIC CDRActionGroupEnd   )  [private]
 

BOOL CDRActionGroupEnd::DoAction CDRFilter C  )  [virtual]
 

does some funcky stuff to put objects in a group

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
26 03 95
Parameters:
none [INPUTS]
Returns:
error flag
See also:

Implements CDRActionListItem.

Definition at line 1677 of file cdrfiltr.cpp.

01678 {
01679     // make sure we have some objects to put in a group
01680     if(C->pLevelNodeList == 0)
01681     {
01682         // restore the pointer
01683         C->pLevelNodeList = pOldLevelNodeList;
01684         // and exit
01685         return TRUE;
01686     }
01687     
01688     // make a new group node
01689     NodeGroup *pGroup = new NodeGroup;
01690 
01691     if(pGroup == 0)
01692         return FALSE;
01693 
01694     // OK, pop everything on the level node list onto this nice new group
01695     C->pLevelNodeList->InsertChainSimple(pGroup, LASTCHILD);
01696 
01697     // restore the old pointer
01698     C->pLevelNodeList = pOldLevelNodeList;
01699 
01700     // and attach!
01701     if(C->pLevelNodeList == 0)
01702     {
01703         C->pLevelNodeList = pGroup;
01704     } else {
01705         pGroup->AttachNode(C->pLevelNodeList, PREV);
01706         C->pLevelNodeList = pGroup; 
01707     }
01708 
01709     // and that's it
01710     return TRUE;
01711 }

void CDRActionGroupEnd::ImportFailure CDRFilter C  )  [virtual]
 

ensures no memory leaks if the import fails

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
26 03 95
Parameters:
none [INPUTS]
Returns:
error flag
See also:

Implements CDRActionListItem.

Definition at line 1727 of file cdrfiltr.cpp.

01728 {
01729     if(pOldLevelNodeList != 0)
01730     {
01731         // delete all the entries stored in this action
01732         C->DeleteNodeList(pOldLevelNodeList);
01733     }
01734 }


Member Data Documentation

friend CDRActionGroupEnd::CDRActionList [private]
 

Reimplemented from CDRActionListItem.

Definition at line 590 of file cdrfiltr.h.

friend CDRActionGroupEnd::CDRFilter [private]
 

Definition at line 591 of file cdrfiltr.h.

NodeRenderable* CDRActionGroupEnd::pOldLevelNodeList [private]
 

Definition at line 602 of file cdrfiltr.h.


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