Package | com.soma.core.wire |
Class | public class SomaWires |
Inheritance | SomaWires ![]() |
Author: Romuald Quantin - www.soundstep.com
Resources: http://www.soundstep.com/downloads/somacore
Actionscript version: 3.0
Copyright: Mozilla Public License 1.1 (MPL 1.1) http://www.opensource.org/licenses/mozilla1.1.php
The SomaWires class handles the wires of the application. See the Wire class documentation for implementation.See also
Property | Defined By | ||
---|---|---|---|
wires : Dictionary
List of the wires registered to the framework. | SomaWires |
Method | Defined By | ||
---|---|---|---|
Create an instance of the SomaWires class. | SomaWires | ||
Registers a wire to the framework. | SomaWires | ||
dispose():void
Destroys all the models and properties. | SomaWires | ||
Retrieves the wire instance that has been registered using its name. | SomaWires | ||
getWires():Dictionary
Retrieves all the wire instances that have been registered to the framework. | SomaWires | ||
hasWire(wireName:String):Boolean
Indicates wether a wire has been registered to the framework. | SomaWires | ||
removeWire(wireName:String):void
Removes a wire from the framework and call the dispose method of this wire. | SomaWires |
wires | property |
protected var wires:Dictionary
List of the wires registered to the framework.
SomaWires | () | Constructor |
public function SomaWires(instance:ISoma)
Create an instance of the SomaWires class. Should not be directly instantiated, the framework will instantiate the class.
Parametersinstance:ISoma — Framework instance.
|
addWire | () | method |
public function addWire(wireName:String, wire:IWire):IWire
Registers a wire to the framework.
Parameters
wireName:String — Name of the wire.
| |
wire:IWire — Instance of the wire.
|
IWire — The wire instance.
|
addWire(MyWire.NAME, new MyWire());
dispose | () | method |
public function dispose():void
Destroys all the models and properties. The class will call the dispose method of each model instance.
getWire | () | method |
public function getWire(wireName:String):IWire
Retrieves the wire instance that has been registered using its name.
Parameters
wireName:String — Name of the wire.
|
IWire — A wire instance.
|
var myWire:MyWire = getWire(MyWire.NAME) as MyWire;
getWires | () | method |
public function getWires():Dictionary
Retrieves all the wire instances that have been registered to the framework.
ReturnsDictionary — A Dictionary (the key of the Dictionary is the name used for the registration).
|
var wires:Dictionary = getWires();
hasWire | () | method |
public function hasWire(wireName:String):Boolean
Indicates wether a wire has been registered to the framework.
Parameters
wireName:String — Name of the wire.
|
Boolean — A Boolean.
|
hasWire(MyWire.NAME);
removeWire | () | method |
public function removeWire(wireName:String):void
Removes a wire from the framework and call the dispose method of this wire.
Parameters
wireName:String — Name of the wire.
|
removeWire(MyWire.NAME);