BuildMouldAction Class Reference

When executed this action will get the mould to rebuild itself. More...

#include <moldedit.h>

Inheritance diagram for BuildMouldAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 BuildMouldAction ()
 BuildMouldAction constructor.
virtual ActionCode Execute ()
 This is a pure virtual method which should be redefined for all derived classes of Action.

Static Public Member Functions

static ActionCode DoRecord (Operation *const pOp, NodeMould *pMould)
static ActionCode Init (Operation *const pOp, ActionList *pActionList, NodeMould *pMould, Action **NewAction)

Private Attributes

NodeMouldpBuildMould

Detailed Description

When executed this action will get the mould to rebuild itself.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95
See also:
-

Definition at line 405 of file moldedit.h.


Constructor & Destructor Documentation

BuildMouldAction::BuildMouldAction  ) 
 

BuildMouldAction constructor.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95

Definition at line 2168 of file moldedit.cpp.

02169 {
02170     pBuildMould=NULL;
02171 }


Member Function Documentation

ActionCode BuildMouldAction::DoRecord Operation *const   pOp,
NodeMould pMould
[static]
 

Definition at line 2177 of file moldedit.cpp.

02178 {
02179     EndRebuildMouldAction* Act;  
02180     // Attempt to initialise the next action    
02181     return BuildMouldAction::Init(pOp, pOp->GetUndoActionList(), pMould, (Action**)(&Act));
02182 }

ActionCode BuildMouldAction::Execute  )  [virtual]
 

This is a pure virtual method which should be redefined for all derived classes of Action.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: If this method is ever called then an ENSURE failure will occur.

See also:
-

Reimplemented from Action.

Definition at line 2209 of file moldedit.cpp.

02210 {
02211     ActionCode Ac = AC_OK;
02212     OperationStatus OpStat = pOperation->OpStatus;
02213     BuildMouldAction Act;
02214 
02215     Ac = BuildMouldAction::Init(pOperation, pOppositeActLst, pBuildMould, (Action**)(&Act));
02216 
02217     if (Ac != AC_FAIL)
02218     {
02219         NodeMoulder* pMoulder = pBuildMould->FindFirstMoulder();
02220         NodeMouldGroup* pMouldGroup = pBuildMould->FindMouldGroup();
02221 
02222         if (pMoulder!=NULL && pMouldGroup!=NULL)
02223         {
02224             // DO, UNDO, REDO destroy all moulder objects
02225             pMoulder->DestroyMouldedObjects();
02226 
02227             // for DO and REDO we need to recreate them
02228             if (OpStat==DO || OpStat==REDO)
02229             {
02230                 if (!pMoulder->CreateMouldedObjects(pMouldGroup, pBuildMould->GetGeometry(), NULL)) 
02231                 {
02232                     // failed to recreate so toast em.
02233                     pMoulder->DestroyMouldedObjects();
02234                     Ac = AC_FAIL;
02235                 }
02236             }
02237         }
02238     }
02239 
02240     return Ac;
02241 }

ActionCode BuildMouldAction::Init Operation *const   pOp,
ActionList pActionList,
NodeMould pMould,
Action **  NewAction
[static]
 

Definition at line 2188 of file moldedit.cpp.

02192 {       
02193     ActionCode Ac = (Action::Init(pOp,
02194                                   pActionList,
02195                                   sizeof(BuildMouldAction), 
02196                                   CC_RUNTIME_CLASS(BuildMouldAction), 
02197                                   NewAction));
02198     if (*NewAction != NULL)
02199     {
02200         ((BuildMouldAction*)(*NewAction))->pBuildMould = pMould;
02201     }
02202     return (Ac); 
02203 } 


Member Data Documentation

NodeMould* BuildMouldAction::pBuildMould [private]
 

Definition at line 421 of file moldedit.h.


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