| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
CarTaker is the class used to store states of an object and to redo and undo state of the object
protected var _aStack:Array
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The stack.
protected var _curIndex:uint
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
protected var _maxSize:uint
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The maximun size of the stack, can be null
protected var _originator:IOriginator
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The originator
public function CarTaker(originator:IOriginator = null, maxSize:uint = 0)
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Creates a new CarTaker
Parameters
| originator:IOriginator (default = null) |
| |
| maxSize:uint (default = 0) |
public function clear():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Clear the IMemento list
public function getIndex():uint
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Return the current index
Returns
| uint — The current index in the list.
|
public function getMemento(index:uint):IMemento
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
return the IMemento at the index in the list
Parameters
| index:uint — The index in the list.
|
Returns
public function redo():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Redo the state of the IMemento
public function saveMemento(m:IMemento = null):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
store a new IMemento in the list
Parameters
| m:IMemento (default = null) — m the new memento to save
if the memento is null creates a new memento with the originator
|
public function setIndex(index:uint):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Set the current index
Parameters
| index:uint — The new current index in the list.
|
public function size():uint
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Return the size of the stack
Returns
| uint — The size of the stack.
|
public function toString():String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the string representation of this instance.
Returns
| String — the string representation of this instance
|
public function undo():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Undo the state of the IMemento
LowRA API documentation 2008- 2009
Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1
mer. févr. 25 2009, 9:22 AM GMT+01:00