StartRebuildMouldAction Class Reference

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

#include <moldedit.h>

Inheritance diagram for StartRebuildMouldAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 StartRebuildMouldAction ()
 RebuildMouldAction constructor.
virtual ActionCode Execute ()
 Executes the RebuildMouldAction which invalidates a rectangular region of the current document.

Static Public Member Functions

static ActionCode DoRecord (Operation *const pOp, NodeMould *pMould)
static ActionCode Init (Operation *const pOp, ActionList *pActionList, NodeMould *pMould, Action **NewAction)
 This simple action invalidates a rectangular region.

Private Attributes

NodeMouldpRebuildMould

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 437 of file moldedit.h.


Constructor & Destructor Documentation

StartRebuildMouldAction::StartRebuildMouldAction  ) 
 

RebuildMouldAction constructor.

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

Definition at line 1947 of file moldedit.cpp.

01948 {
01949     pRebuildMould=NULL;
01950 }


Member Function Documentation

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

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95
Parameters:
pOp = The operation to which the action should be added [INPUTS] pMould = A pointer to a mould to rebuild
- [OUTPUTS]
Returns:
ActionCode: one of AC_OK, AC_NORESTORE, AC_FAIL

Definition at line 1968 of file moldedit.cpp.

01969 {
01970     StartRebuildMouldAction* Act;  
01971     // Attempt to initialise the next action    
01972     return StartRebuildMouldAction::Init(pOp, pOp->GetUndoActionList(), pMould, (Action**)(&Act));
01973 }

ActionCode StartRebuildMouldAction::Execute  )  [virtual]
 

Executes the RebuildMouldAction which invalidates a rectangular region of the current document.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95
Parameters:
- [INPUTS]
Returns:
ActionCode indicating if the action was successfully executed or not

Reimplemented from Action.

Definition at line 2027 of file moldedit.cpp.

02028 {
02029     EndRebuildMouldAction* Act;  
02030     ActionCode Ac;  
02031     // Attempt to initialise the next action    
02032     Ac = EndRebuildMouldAction::Init(pOperation, pOppositeActLst, pRebuildMould, (Action**)(&Act));
02033     
02034     if (Ac!=AC_FAIL)
02035     {   
02036         if (!pRebuildMould->IsDetached())
02037         {
02038             // The action was successfully initialised   
02039             NodeMoulder* pMoulder = pRebuildMould->FindFirstMoulder();
02040             NodeMouldGroup* pMouldGroup = pRebuildMould->FindMouldGroup();
02041 
02042             if (pMoulder!=NULL && pMouldGroup!=NULL)
02043             {
02044                 pMoulder->DestroyMouldedObjects();
02045                 if (!pMoulder->CreateMouldedObjects(pMouldGroup, pRebuildMould->GetGeometry(), NULL)) 
02046                 {
02047                     pMoulder->DestroyMouldedObjects();
02048                     return AC_FAIL;
02049                 }
02050             }
02051         }
02052     }
02053     return Ac;
02054 }   

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

This simple action invalidates a rectangular region.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/95
Parameters:
pOp,: The operation to which the action should be added [INPUTS] pActionList: The action list in the operation object pMould: A pointer to a mould to rebuild
NewAction,: A pointer to the action if it could be allocated. [OUTPUTS]
Returns:
ActionCode: one of AC_OK, AC_NORESTORE, AC_FAIL

Definition at line 1995 of file moldedit.cpp.

01999 {       
02000     ActionCode Ac = (Action::Init(pOp,
02001                                   pActionList,
02002                                   sizeof(StartRebuildMouldAction), 
02003                                   CC_RUNTIME_CLASS(StartRebuildMouldAction), 
02004                                   NewAction));
02005     if (*NewAction != NULL)
02006     {
02007         ((StartRebuildMouldAction*)(*NewAction))->pRebuildMould = pMould;
02008     }
02009     return (Ac); 
02010 } 


Member Data Documentation

NodeMould* StartRebuildMouldAction::pRebuildMould [private]
 

Definition at line 453 of file moldedit.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:01:25 2007 for Camelot by  doxygen 1.4.4