Summary


This chapter discusses the Memento pattern, which provides an elegant way to store an object's state while at the same time breaking no rules of encapsulation. An object for which you need to record state is called the originator. The originator is responsible for returning a memento object that stores the object's current state, and the originator is also responsible to managing its own state by applying a stored state from a memento. The memento objects can be stored by a caretaker object until they are reapplied to the originator.




Advanced ActionScript 3 with Design Patterns
Advanced ActionScript 3 with Design Patterns
ISBN: 0321426568
EAN: 2147483647
Year: 2004
Pages: 132

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net