Packagesandy.parser
Classpublic class ParserStack
InheritanceParserStack Inheritance flash.events.EventDispatcher

ParserStack utility class.

An utility class that acts as a parser stack. You can a set of parser objects, and it process to the loading/parsing automatially and sequentially.



Public Properties
 PropertyDefined by
  progress : Number = 0
The percent of the loading that is complete.
ParserStack
Public Methods
 MethodDefined by
  
Constructor.
ParserStack
  
add(p_sName:String, p_oParser:IParser):void
Add a parser to the list.
ParserStack
  
clear():void
Clears the stack.
ParserStack
  
getGroupByName(p_sName:String):Group
Get the parser group object associated with the parser name.
ParserStack
  
getParserByName(p_sName:String):IParser
Retrieve the parser you stored by the associated name.
ParserStack
  
start():void
Launch the loading/parsing process.
ParserStack
Events
 EventSummaryDefined by
   Dispatched when the parsing process is complete.ParserStack
   Dispatched when an error occurs in the parsing process.ParserStack
   Dispatched when data is received as the parsing progresses.ParserStack
Public Constants
 ConstantDefined by
  COMPLETE : String = "parserstack_complete"
[static] Defines the value of the type property of a parserstack_complete event object.
ParserStack
  ERROR : String = "parserstack_error"
[static] Defines the value of the type property of a parserstack_error event object.
ParserStack
  PROGRESS : String = "parserstack_progress"
[static] Defines the value of the type property of a parserstack_progress event object.
ParserStack
Property detail
progressproperty
public var progress:Number = 0

The percent of the loading that is complete.

Constructor detail
ParserStack()constructor
public function ParserStack()

Constructor.

Method detail
add()method
public function add(p_sName:String, p_oParser:IParser):void

Add a parser to the list.

Parameters
p_sName:String — the parser name to reference with
 
p_oParser:IParser — The parser instance
clear()method 
public function clear():void

Clears the stack.

getGroupByName()method 
public function getGroupByName(p_sName:String):Group

Get the parser group object associated with the parser name. Returns null if no parser is associated with that name

Parameters
p_sName:String

Returns
Group
getParserByName()method 
public function getParserByName(p_sName:String):IParser

Retrieve the parser you stored by the associated name. If no parser with that name is found, null is returned

Parameters
p_sName:String

Returns
IParser
start()method 
public function start():void

Launch the loading/parsing process.

Event detail
parserstack_completeevent 
Event object type: sandy.parser.ParserStack
ParserStack.type property = sandy.parser.ParserStack.COMPLETE

Dispatched when the parsing process is complete.

Defines the value of the type property of a parserstack_complete event object.

parserstack_errorevent  
Event object type: sandy.parser.ParserStack
ParserStack.type property = sandy.parser.ParserStack.ERROR

Dispatched when an error occurs in the parsing process.

Defines the value of the type property of a parserstack_error event object.

parserstack_progressevent  
Event object type: sandy.parser.ParserStack
ParserStack.type property = sandy.parser.ParserStack.PROGRESS

Dispatched when data is received as the parsing progresses.

Defines the value of the type property of a parserstack_progress event object.

Constant detail
COMPLETEconstant
public static const COMPLETE:String = "parserstack_complete"

Defines the value of the type property of a parserstack_complete event object.

ERRORconstant 
public static const ERROR:String = "parserstack_error"

Defines the value of the type property of a parserstack_error event object.

PROGRESSconstant 
public static const PROGRESS:String = "parserstack_progress"

Defines the value of the type property of a parserstack_progress event object.