Packagecom.soma.interfaces
Interfacepublic interface ILibrary
ImplementorsLibrary

Author: Romuald Quantin - www.soundstep.com

Information:
Blog page - SomaUI
How does it work - Soma Protest
Project Host - Google Code
Documentation - Soma ASDOC
Class version: 2.0
Actionscript version: 3.0

Copyright:

The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied.
See the License for the specific language governing rights and
limitations under the License.

The Original Code is Soma.
The Initial Developer of the Original Code is Romuald Quantin.
Initial Developer are Copyright (C) 2008-2009 Soundstep. All Rights Reserved.

Usage:
A Library instance is meant to be used by a NodeParser instance and must implements ILibrary. The global Library instance is accessible using Soma.getInstance().library.

See also

Library
NodeParser


Public Methods
 MethodDefined by
  
getAsset(name:String):Class
Get an asset class (IAsset) from its name, usually used by a NodeParser instance.
ILibrary
  
registerAsset(name:String, asset:Class):void
Register a class with its name to be instantiated by a NodeParser instance from an XML node.
ILibrary
Method detail
getAsset()method
public function getAsset(name:String):Class

Get an asset class (IAsset) from its name, usually used by a NodeParser instance.

Parameters
name:String — Name of the class (used when register).

Returns
Class — a Class.
registerAsset()method 
public function registerAsset(name:String, asset:Class):void

Register a class with its name to be instantiated by a NodeParser instance from an XML node.

Parameters
name:String — name of the asset (will be used as an XML node name: <myAssetName />)
 
asset:Class — class implementing IAsset that will instantiate the asset using an XML node.