| Package | com.asterisq.graph.parsers |
| Class | public class AsyncGraphParser |
| Inheritance | AsyncGraphParser GraphParser flash.events.EventDispatcher |
| Implements | IGraphParser |
When subclassing the AsyncGraphParser, you will need to set override two
methods: parse and parseStep. The parse
method should be used to initialize the parsing and make a call
to startParsing. The parseStep method should be
used to perform a small step in the parsing, such as reading and parsing
an single line of graph data. This method will be called repeatedly each
frame until the processing time limit is reached or the job parsing is complete.
| Property | Defined by | ||
|---|---|---|---|
| processingTimeLimit : Number
The maximum amount of time allowed for processing during a single frame.
| AsyncGraphParser | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new graph parser.
| AsyncGraphParser | ||
![]() |
fromXML(graphParserElem:XML):IGraphParser
[static]
Creates an IGraphParser instance and initializes it with the given XML data.
| GraphParser | |
|
Starts parsing a graph from raw data.
| AsyncGraphParser | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
loadValuesFromXML(graphParserElem:XML):void
Load values from the given XML element into this GraphParser.
| GraphParser | |
|
parseStep():Boolean
Performs a small step in the parsing.
| AsyncGraphParser | ||
|
startParsing():void
Starts asynchronous parsing of the graph data.
| AsyncGraphParser | ||
| processingTimeLimit | property |
processingTimeLimit:Number [read-write]The maximum amount of time allowed for processing during a single frame. Keep this number below the duration of each frame.
Implementation public function get processingTimeLimit():Number
public function set processingTimeLimit(value:Number):void
| AsyncGraphParser | () | constructor |
public function AsyncGraphParser()Creates a new graph parser.
| parse | () | method |
public override function parse(graph:IGraph, data:*):void
Starts parsing a graph from raw data. This method should
be overridden to setup the parsing and make a call to
startParsing.
graph:IGraph |
|
data:* |
| parseStep | () | method |
protected function parseStep():Boolean
Performs a small step in the parsing. This method should be overridden
to do a small portion of parsing. The method should return true if parsing
is complete, or false otherwise. When this method returns true, it will
no longer be called until startParsing is called again.
When this method returns true, the graph parser will dispatch a
Event.COMPLETE event.
Boolean |
| startParsing | () | method |
protected function startParsing():void
Starts asynchronous parsing of the graph data. This causes parseStep
to be called repeatedly until it returns true.