Registry
The Registry is a simple class that maintains a list of available controls and scenes, and can return them given control kinds or scene IDs.
Method Summary
| Public Methods | ||
| public |
getControl(kind: string): IControlDescriptor Returns the Control descriptor for a control of the given kind, or thows if it's not found. |
|
| public |
getInputs(control: object): IInputDescriptor[] Returns inputs defined on the given control instance. |
|
| public |
getScene(id: string): ISceneDescriptor Returns the Scene descriptor for the given scene ID, returning the default scene if a specific handler wasn't found. Throws if no default scene is present and the specific ID is not registered. |
|
| public |
Adds a collection of controls and scenes to the registry. |
|
Public Methods
public getControl(kind: string): IControlDescriptor source
Returns the Control descriptor for a control of the given kind, or thows if it's not found.
Params:
| Name | Type | Attribute | Description |
| kind | string |
Throw:
if the control kind is not found |
public getInputs(control: object): IInputDescriptor[] source
Returns inputs defined on the given control instance.
Params:
| Name | Type | Attribute | Description |
| control | object |
public getScene(id: string): ISceneDescriptor source
Returns the Scene descriptor for the given scene ID, returning the default scene if a specific handler wasn't found. Throws if no default scene is present and the specific ID is not registered.
Params:
| Name | Type | Attribute | Description |
| id | string |
Throw:
if an appropriate scene implementation is not found |
