Interface to a memento used for saving the important state of an object in a form that can be persisted in the file system.
Mementos were designed with the following requirements in mind:
- Certain objects need to be saved and restored across platform sessions.
- When an object is restored, an appropriate class for an object might not be available. It must be possible to skip an object in this case.
- When an object is restored, the appropriate class for the object may be different from the one when the object was originally saved. If so, the new class should still be able to read the old form of the data.
Mementos meet these requirements by providing support for storing a mapping of arbitrary string keys to primitive values, and by allowing mementos to have other mementos as children (arranged into a tree). A robust external storage format based on XML is used.
The key for an attribute may be any alpha numeric value. However, the value of TAG_ID
is reserved for internal use.
This interface is not intended to be implemented or extended by clients.
@see IPersistableElement
@see IElementFactory