Class fever.app.memento.DynMemento

Implemented Interfaces

Memento

Description

Allow construction of very basic memento structure used in Memento Pattern.

DynMemento is declare as "dynamic" to allow runtime properties definition without care about strong memento type.

Better way is to implement an clean instance memento structure, but we can use DynMemento to go faster.

Example (somewhere in an Originator instance <@code public function saveMemento() : IMemento { Logger.LOG( "Saving state", LogLevel.INFO, FeverDebug.channel ); var m : DynMemento = new DynMemento(); m.budget = _budget; m.name = _name; m.phone = _phone; return m; } }

See Also

Constructor Detail

DynMemento

public function DynMemento()

Constructor.

Instance is automatically protected by fever.utils.ObjectUtils.protectObject() which allow logging feature when accessing unavailable instance properties.