Objective Views : Chapter 12 Commands : Executing and Unexecuting
Executing and Unexecuting
A command does not perform an action until its Execute() method is called. The command stores any additional information it might need to undo a command and then calls methods in the model to perform its action.
When a command is undone, its Unexecute() method is called. Stored information is retrieved from here and then the action is reversed. Some unexecute methods create a whole new command that performs the inverse action and then executes it.