|
-
Class Item is the originator with some internal states.
-
The user of Item::create_memento( ) and
Item::restore_memento( ) is commonly referred to as a caretaker.
-
We usually want Memento objects be created only by
Item::create_memento( ).
-
We might also want to allow incremental restoration via
a stack of Mementos.
-
It is possible to implement Memento file I/O (or database) interface to add persistence of states.
|