-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Purpose of this Repository is to provide an educational starting point for design and implementation considerations as well as for test driven development. Therefore, there is a folder (UndoRedoCustomized) with a predefined custom implementation with empty methods and a test project (UndoRedoCustomizedTest) for that implementation: see Test Design
In our C++ Workshop, we will discus and implement the framework based on the tests as requirement specification in the folder Test.
Purpose of this framework is to support a customizable undo / redo framework for interactive applications with a default reference implementation.
A detailed documentation is found in my OODPScript.pdf
Ask for Workshops and Scripts at http://www.gerdhirsch.de/Seminare.html
Abstractions used by applications are:
- Command to implement application specific Commands
- UndoRedoManager to manage undo, redo and state changes of the application
- CompositeCommand to manage multiple Commands as one
- UndoRedoStack to manage only undo and redo with out state changes
The Framework provides for each Abstraction a default implementation *Impl.
This Framework is based on the Design Patterns of the GoF
called Command Pattern and Composite Pattern.
UndoRedoManager is Invoker,
it establishes the possibility to track modifications.
UndoRedoStack is the common infrastructure for UndoRedoManager and CompositeCommand
There is also a CompositeCommand for user defined sequences of commands, called makros and programmable multiple Commands
Tests are provided in folder Test for UndoRedoStack, UndoRedoManager and CompositeCommand. They are also usage examples based on a simple Calculator and Plus and Minus Commands. The tests are based on the C++ Unit Test Easy CUTE Framework: http://cute-test.com/
Test Design is based on the Template Method and Factory Method Pattern (GoF).