#include <moldedit.h>
Inheritance diagram for BuildMouldAction:
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 | |
NodeMould * | pBuildMould |
Definition at line 405 of file moldedit.h.
|
BuildMouldAction constructor.
Definition at line 2168 of file moldedit.cpp. 02169 { 02170 pBuildMould=NULL; 02171 }
|
|
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 }
|
|
This is a pure virtual method which should be redefined for all derived classes of Action.
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 }
|
|
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 }
|
|
Definition at line 421 of file moldedit.h. |