G: > This pattern is very simple : all user commands are represented by > instances of an abstract Command class, which has only two methods : > execute() and, obviously, unexecute().
Note that some of our commands use an intermediate class (BasicCommand) to provide unexecute. This basically implements a brute-force undo for commands that modify part of a Segment - at construction time the command indicates what region of the segment it will modify and the class saves a copy of the events in that region, restoring them on unexecute. It can optionally implement execute() the same way on all but the first invocation (brute-force redo). This class is where the modifySegment method originates. Chris ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Rosegarden-devel mailing list [email protected] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
