RecordChangeCodesAction Class Reference

This class records undo/redo information for the Perspective shape object. More...

#include <nodemold.h>

Inheritance diagram for RecordChangeCodesAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 RecordChangeCodesAction ()
 Constructor for the action to undo Perspective modification.
 ~RecordChangeCodesAction ()
 Destructor for the action to undo Perspective modification.
virtual ActionCode Execute ()
 This is the virtual function that is called when the action is executed by the Undo/Redo system.

Static Public Member Functions

static ActionCode Init (Operation *pOp, ActionList *pActionList, NodeMould *pMould, Action **NewAction)
 This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NORECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.

Private Attributes

NodeMouldpCRCMould
INT32 CRCcode
INT32 CRCWidth
INT32 CRCHeight

Detailed Description

This class records undo/redo information for the Perspective shape object.

class RecordChangeCodesAction : public Action

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

Definition at line 324 of file nodemold.h.


Constructor & Destructor Documentation

RecordChangeCodesAction::RecordChangeCodesAction  ) 
 

Constructor for the action to undo Perspective modification.

RecordChangeCodesAction::RecordChangeCodesAction()

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

Definition at line 3123 of file nodemold.cpp.

03124 {
03125     pCRCMould=NULL;
03126     CRCcode=0;
03127     CRCWidth=0;
03128     CRCHeight=0;
03129 }

RecordChangeCodesAction::~RecordChangeCodesAction  ) 
 

Destructor for the action to undo Perspective modification.

RecordChangeCodesAction::~RecordChangeCodesAction()

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

Definition at line 3142 of file nodemold.cpp.

03143 {
03144 }


Member Function Documentation

ActionCode RecordChangeCodesAction::Execute  )  [virtual]
 

This is the virtual function that is called when the action is executed by the Undo/Redo system.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/01/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
ActionCode, = AC_OK if the action was created correctly = AC_NORECORD if no memory to undo/redo but go ahead anyway without undo = AC_FAIL stop the operation

Errors: -

See also:
-

Reimplemented from Action.

Definition at line 3223 of file nodemold.cpp.

03224 {
03225     // try to create a redo record
03226     RecordChangeCodesAction* NewAction;
03227     ActionCode Ac;
03228     Ac = RecordChangeCodesAction::Init(pOperation, pOppositeActLst, pCRCMould, (Action**)(&NewAction));
03229     
03230     if (pCRCMould)
03231     {
03232         pCRCMould->OnCC_CRC     = CRCcode;
03233         pCRCMould->OnCC_Width   = CRCWidth;
03234         pCRCMould->OnCC_Height  = CRCHeight;
03235     }
03236         
03237     return Ac;
03238 }

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

This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NORECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/01/95
Parameters:
pOp = a pointer to the operation to which this action belongs [INPUTS] pActionList = is the action list to which this action should be added pMould = a pointer to a NodeMould object
NewAction = a pointer to a pointer to an action, allowing the function to [OUTPUTS] return a pointer to the created action.
Returns:
ActionCode, = AC_OK if the action was created correctly = AC_NORECORD if no memory to undo/redo but go ahead anyway without undo = AC_FAIL stop the operation

Errors: -

See also:
Action::Init()

Definition at line 3179 of file nodemold.cpp.

03183 {
03184     ActionCode Ac = AC_FAIL;
03185     if (pMould!=NULL)
03186     {
03187         UINT32 ActSize = sizeof(RecordChangeCodesAction);
03188         Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(RecordChangeCodesAction), NewAction);
03189         if (Ac==AC_OK)
03190         {
03191             RecordChangeCodesAction* pAct = ((RecordChangeCodesAction*)*NewAction);
03192             if (pAct)
03193             {
03194                 pAct->pCRCMould = pMould;
03195                 pAct->CRCcode   = pMould->OnCC_CRC;
03196                 pAct->CRCWidth  = pMould->OnCC_Width;
03197                 pAct->CRCHeight = pMould->OnCC_Height;
03198             }
03199         }
03200     }
03201     return Ac;
03202 }


Member Data Documentation

INT32 RecordChangeCodesAction::CRCcode [private]
 

Definition at line 338 of file nodemold.h.

INT32 RecordChangeCodesAction::CRCHeight [private]
 

Definition at line 340 of file nodemold.h.

INT32 RecordChangeCodesAction::CRCWidth [private]
 

Definition at line 339 of file nodemold.h.

NodeMould* RecordChangeCodesAction::pCRCMould [private]
 

Definition at line 337 of file nodemold.h.


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