Packagejp.progression.commands
Classpublic class CommandList
InheritanceCommandList Inheritance Command Inheritance flash.events.EventDispatcher
SubclassesParallelList, SerialList

CommandList クラスは、コマンドリストでコマンドコンテナとして機能する全てのコマンドの基本となるクラスです。



Public Properties
 PropertyDefined by
 InheritedcatchError : Function
コマンドの実行中に例外が発生した際に実行するエラー処理関数を取得または設定します。
Command
 InheritedclassName : String
インスタンスのクラス名を取得します。 Indicates the instance className of the Command.
Command
  commands : Array
[read-only] 子コマンドインスタンスが保存されている配列です。 この配列を操作することで元の配列を変更することはできません。
CommandList
 InheriteddefaultInterruptType : int
[static] interruptType プロパティの初期値を取得または設定します。 すでに生成済みのコマンドに対しては適用されません。
Command
 InheriteddefaultTimeout : Number
[static] timeout プロパティの初期値を取得または設定します。 すでに生成済みのコマンドに対しては適用されません。
Command
 Inheriteddelay : Number
コマンドが実際に実行されるまでの遅延時間を取得または設定します。 コマンド実行中に値を変更しても、処理に対して反映されません。
Command
 Inheriteddepth : int
コマンドツリー構造上での自身の深度を取得します。
Command
 Inheritedextra : Object
コマンドの実行処理、または中断処理の開始時に指定されているリレーオブジェクトを取得または設定します。 このコマンドが親の CommandList インスタンスによって実行されている場合には、親のリレーオブジェクトを順々に引き継ぎます。
Command
 Inheritedgroup : String
インスタンスのグループ名を取得または設定します。 Indicates the instance group of the Command.
Command
 Inheritedid : String
インスタンスを表すユニークな識別子を取得または設定します。
Command
 InheritedinterruptType : int
中断処理時の処理方法を取得または設定します。 コマンド実行中に値を変更しても、処理に対して反映されません。
Command
 InheritedlatestData : *
自身から見て最後に関連付けられた読み込みデータを取得または設定します。 このコマンドが CommandList インスタンス上に存在する場合には、自身より前、または自身の親のデータを取得します。
Command
 Inheritedname : String
インスタンスの名前を取得または設定します。 Indicates the instance name of the Command.
Command
 Inheritednext : Command
このコマンドが関連付けられている親の CommandList インスタンス内で、次に位置する Command インスタンスを取得します。
Command
  numCommands : int
[read-only] 子として登録されているコマンド数を取得します。
CommandList
 InheritedonComplete : Function
コマンドオブジェクトが ExecuteEvent.EXECUTE_COMPLETE イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
Command
 InheritedonError : Function
コマンドオブジェクトが ExecuteErrorEvent.EXECUTE_ERROR イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
Command
 InheritedonInterrupt : Function
コマンドオブジェクトが ExecuteEvent.EXECUTE_INTERRUPT イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
Command
 InheritedonStart : Function
コマンドオブジェクトが ExecuteEvent.EXECUTE_START イベントを受け取った場合に呼び出されるイベントハンドラメソッドを取得または設定します。
Command
 Inheritedparent : CommandList
この Command オブジェクトを含む CommandList オブジェクトを示します。 Indicates the CommandList object that contains this Command object.
Command
  position : int
[read-only] 現在処理しているコマンド位置を取得または設定します。
CommandList
 Inheritedprevious : Command
このコマンドが関連付けられている親の CommandList インスタンス内で、一つ前に位置する Command インスタンスを取得します。
Command
 Inheritedroot : Command
コマンドツリー構造の一番上に位置する Command インスタンスを取得します。
Command
 Inheritedscope : Object
コマンドの実行処理、または中断処理に指定されている関数内でのスコープ対象を取得または設定します。
Command
 Inheritedstate : int
コマンドの実行状態を取得します。
Command
 InheritedthresholdLength : int
[static] 同一プロセス上で実行可能な最大コマンド数を取得または設定します。 設定された閾値を超えて実行された場合には、強制的に 1 ミリ秒の遅延を発生させます。 この値が大きすぎる場合、スタックオーバーフローが発生する可能性があります。
Command
 Inheritedtimeout : Number
コマンドの実行中のタイムアウト時間を取得または設定します。 指定された時間中に executeComplete() メソッド、または interrupt() メソッドが実行されなかった場合にはエラーが送出されます。 この値が 0 に設定されている場合、タイムアウト処理は発生しません。
Command
Public Methods
 MethodDefined by
  
CommandList(executeFunction:Function = null, interruptFunction:Function = null, initObject:Object = null, ... commands)
新しい CommandList インスタンスを作成します。 Creates a new CommandList object.
CommandList
  
addCommand(... commands):void
登録されているコマンドリストの最後尾に新しくコマンドインスタンスを追加します。
CommandList
  
clearCommand(completely:Boolean = false):void
コマンドインスタンスをリストから削除します。
CommandList
  
CommandList インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an CommandList subclass.
CommandList
  
dispose():void
保持しているデータを解放します。
CommandList
 Inherited
execute(extra:Object = null):void
コマンド処理を実行します。
Command
 Inherited
実行中のコマンド処理が完了したことを通知します。 このメソッドを実行するためには、事前に execute() メソッドが実行されている必要があります。
Command
  
getCommandAt(index:int):Command
指定のインデックス位置にある子 Command インスタンスオブジェクトを返します。 Returns the child Command instance that exists at the specified index.
CommandList
  
getCommandIndex(command:Command):int
指定された名前に一致する子 Command インスタンスを返します。 Returns the child Command that exists with the specified name.
CommandList
  
insertCommand(... commands):void
現在実行中のコマンドインスタンスの次の位置に新しくコマンドインスタンスを追加します。
CommandList
 Inherited
interrupt(enforced:Boolean = false):void
コマンド処理を中断します。 このメソッドを実行するためには、事前に execute() メソッドが実行されている必要があります。
Command
 Inherited
setProperties(parameters:Object):Command
インスタンスに対して、複数のプロパティを一括設定します。
Command
  
toString():String
指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
CommandList
Protected Methods
 MethodDefined by
  
hasNextCommand():Boolean
次のコマンドインスタンスが存在するかどうかを返します。
CommandList
  
次のコマンドインスタンスを取得して、処理位置を次に進めます。
CommandList
  
reset():void
コマンドの処理位置を最初に戻します。
CommandList
  
throwError(target:Command, error:Error):void
コマンド処理中に例外が発生したことを通知します。 エラー処理が発生すると、コマンド処理が停止します。 問題を解決し、通常フローに戻す場合には executeComplete() メソッドを、問題が解決されず中断処理を行いたい場合には interrupt() メソッドを実行してください。 関数内で問題が解決、または中断処理に移行しなかった場合には ExecuteEvent.ERROR イベントが送出されます。
CommandList
Events
 EventSummaryDefined by
 Inherited 処理が完了した場合に送出されます。 Command
 Inherited 処理の途中でエラーが発生した場合に送出されます。 Command
 Inherited 処理が中断された場合に送出されます。 Command
 Inherited 処理が開始された場合に送出されます。 Command
Property detail
commandsproperty
commands:Array  [read-only]

子コマンドインスタンスが保存されている配列です。 この配列を操作することで元の配列を変更することはできません。

Implementation
    public function get commands():Array
numCommandsproperty 
numCommands:int  [read-only]

子として登録されているコマンド数を取得します。

Implementation
    public function get numCommands():int
positionproperty 
position:int  [read-only]

現在処理しているコマンド位置を取得または設定します。

Implementation
    public function get position():int
Constructor detail
CommandList()constructor
public function CommandList(executeFunction:Function = null, interruptFunction:Function = null, initObject:Object = null, ... commands)

新しい CommandList インスタンスを作成します。 Creates a new CommandList object.

Parameters
executeFunction:Function (default = null)実行関数です。
 
interruptFunction:Function (default = null)中断関数です。
 
initObject:Object (default = null)設定したいプロパティを含んだオブジェクトです。
 
... commands登録したいコマンドインスタンスを含む配列です。
Method detail
addCommand()method
public function addCommand(... commands):void

登録されているコマンドリストの最後尾に新しくコマンドインスタンスを追加します。

Parameters
... commands登録したいコマンドインスタンスを含む配列です。

See also

clearCommand()method 
public function clearCommand(completely:Boolean = false):void

コマンドインスタンスをリストから削除します。

Parameters
completely:Boolean (default = false)true が設定されている場合は登録されている全ての登録を解除し、false の場合には現在処理中のコマンドインスタンス以降の登録を解除します。

See also

clone()method 
public override function clone():Command

CommandList インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an CommandList subclass.

Returns
Command元のオブジェクトと同じプロパティ値を含む新しい CommandList インスタンスです。 A new CommandList object that is identical to the original.
dispose()method 
public override function dispose():void

保持しているデータを解放します。

getCommandAt()method 
public function getCommandAt(index:int):Command

指定のインデックス位置にある子 Command インスタンスオブジェクトを返します。 Returns the child Command instance that exists at the specified index.

Parameters
index:int子 Command インスタンスのインデックス位置です。 The index position of the command object.

Returns
Command指定されたインデックス位置にある子 Command インスタンスです。 The child Command at the specified index position.
getCommandIndex()method 
public function getCommandIndex(command:Command):int

指定された名前に一致する子 Command インスタンスを返します。 Returns the child Command that exists with the specified name.

Parameters
command:Command返される子 Command インスタンスの名前です。 The name of the command to return.

Returns
int指定された名前を持つ子 Command インスタンスです。 The child Command with the specified name.
hasNextCommand()method 
protected function hasNextCommand():Boolean

次のコマンドインスタンスが存在するかどうかを返します。

Returns
Boolean次のコマンドインスタンスが存在すれば true を、それ以外の場合には false です。

See also

insertCommand()method 
public function insertCommand(... commands):void

現在実行中のコマンドインスタンスの次の位置に新しくコマンドインスタンスを追加します。

Parameters
... commands登録したいコマンドインスタンスを含む配列です。

See also

nextCommand()method 
protected function nextCommand():Command

次のコマンドインスタンスを取得して、処理位置を次に進めます。

Returns
Command次に位置するコマンドインスタンスです。

See also

reset()method 
protected function reset():void

コマンドの処理位置を最初に戻します。

See also

throwError()method 
protected override function throwError(target:Command, error:Error):void

コマンド処理中に例外が発生したことを通知します。 エラー処理が発生すると、コマンド処理が停止します。 問題を解決し、通常フローに戻す場合には executeComplete() メソッドを、問題が解決されず中断処理を行いたい場合には interrupt() メソッドを実行してください。 関数内で問題が解決、または中断処理に移行しなかった場合には ExecuteEvent.ERROR イベントが送出されます。

Parameters
target:Command問題の発生元である Command インスタンスです。
 
error:Error原因となるエラーオブジェクトです。

See also

toString()method 
public override function toString():String

指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.

Returns
Stringオブジェクトのストリング表現です。 A string representation of the object.