Brief Overview:

|
Provides the ability to restore an object to its previous state, i.e. an undo.
The Momento pattern uses two objects; the "originator" and a "caretaker". The
originator is some object that has an internal state. The caretaker is going to
ask the originator to do something but wants to be able to undo the change if
necessary. so it first asks for a memento object. After performing the change
if it is necessary to "undo" the change the caretaker passes the momento object
back to the originator to return it to the previous state.
|