#include <ndclpcnt.h>
Inheritance diagram for UpdateCachedKeyholePathAction:
Public Member Functions | |
UpdateCachedKeyholePathAction () | |
Constructor. | |
~UpdateCachedKeyholePathAction () | |
Destructor. | |
virtual ActionCode | Execute () |
Called by Camelot when it meets this Action on an undo/redo ActionList. You should undo/redo the action here and record an opposite action in the opposite ActionList. If the action is not too complex or you can't be bothered with two Actions, then you can use the same Action to both undo and redo, passing it appropriate information via Init(), or other means. | |
Static Public Member Functions | |
static ActionCode | Init (UndoableOperation *pUndoOp, ActionList *pActionList, NodeClipViewController *pUpdateNCVC) |
Action Init function. This is the public interface through which the Action is invoked. It should call Action::Init to actually construct a new Action and put it on the given action list. It should usually also perform the action (we don't actually in this case, as this action is a BODGE so we update NCVC's on undo/redo!). | |
Private Member Functions | |
void | SetNCVCToUpdate (NodeClipViewController *pNCVC) |
Tell us which NCVC we will be updating. | |
Private Attributes | |
NodeClipViewController * | m_pNCVC |
Definition at line 355 of file ndclpcnt.h.
|
Constructor.
Definition at line 2735 of file ndclpcnt.cpp.
|
|
Destructor.
Definition at line 2751 of file ndclpcnt.cpp.
|
|
Called by Camelot when it meets this Action on an undo/redo ActionList. You should undo/redo the action here and record an opposite action in the opposite ActionList. If the action is not too complex or you can't be bothered with two Actions, then you can use the same Action to both undo and redo, passing it appropriate information via Init(), or other means.
Reimplemented from Action. Definition at line 2840 of file ndclpcnt.cpp. 02841 { 02842 // complain loudly if our state is invalid - however, we can survive without it, 02843 // so we'll still return a thumbs up anyway. 02844 ERROR3IF(m_pNCVC == NULL, "UpdateCachedKeyholePathAction::Execute; NULL NCVC pointer!"); 02845 02846 // record our 'inverse' action, and as a side effect of this, our NCVC 02847 // will be told that it needs to update it cached keyhole path. 02848 ActionCode ac = AC_OK; 02849 if (m_pNCVC != NULL) 02850 { 02851 ac = UpdateCachedKeyholePathAction::Init( (UndoableOperation*)pOperation, 02852 pOppositeActLst, 02853 m_pNCVC ); 02854 } 02855 return ac; 02856 }
|
|
Action Init function. This is the public interface through which the Action is invoked. It should call Action::Init to actually construct a new Action and put it on the given action list. It should usually also perform the action (we don't actually in this case, as this action is a BODGE so we update NCVC's on undo/redo!).
Definition at line 2787 of file ndclpcnt.cpp. 02790 { 02791 // call the base class to create and put the action onto the action list. 02792 ActionCode ac = AC_FAIL; 02793 UINT32 ActSize = sizeof(UpdateCachedKeyholePathAction); 02794 UpdateCachedKeyholePathAction* pNewAction = NULL; 02795 ac = Action::Init( pUndoOp, 02796 pActionList, 02797 ActSize, 02798 CC_RUNTIME_CLASS(UpdateCachedKeyholePathAction), 02799 (Action**)&pNewAction ); 02800 02801 // ok, the action now exists. initialise it with the NCVC to be updated, 02802 // and mark the NCVC as needing to update itself. 02803 if (ac != AC_FAIL && pNewAction != NULL) 02804 { 02805 pUpdateNCVC->MarkKeyholeInvalid(); 02806 pNewAction->SetNCVCToUpdate(pUpdateNCVC); 02807 } 02808 02809 // we want the update action to be called last whenever an action is undone or redone, 02810 // so it actually needs to go at the other end of the list. 02811 pActionList->RemoveItem(pNewAction); 02812 pActionList->AddHead(pNewAction); 02813 02814 return ac; 02815 }
|
|
Tell us which NCVC we will be updating.
Definition at line 2870 of file ndclpcnt.cpp. 02871 { 02872 ERROR3IF(pNCVC == NULL, "UpdateCachedKeyholePathAction::SetNCVCToUpdate; NULL param!"); 02873 m_pNCVC = pNCVC; 02874 }
|
|
Definition at line 374 of file ndclpcnt.h. |