|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The manager of route information for both static and runtime systems.
The implementation provides a one-shot route processing mechanism. It does not continuously evaluate routes. That is left to the caller code. Once the processRoutes() method is called, it will loop through all available routes until none of them have any changed values to send. At this point it will return and wait until the next time it is called.
Routes are added to a particular execution space. Each space represents an encapsulated world, such as a proto or inline. The route manager is expected to be able to deal with these individual spaces, and keep them separate. Thus, when the execution space is no longer referenced, the associated routes and scripts are to be removed and their outputs no longer processed.
Implementation is not particularly efficient in this version...
| Method Summary | |
void |
addRoute(VRMLExecutionSpace space,
ROUTE route)
Add a route object to the system. |
void |
addRoute(VRMLExecutionSpace space,
VRMLNodeType srcNode,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
Add a route to the system. |
void |
addSpace(VRMLExecutionSpace space)
Add an execution space to the system. |
void |
clear()
Clear all the routes currently being managed here. |
boolean |
processRoutes(double timestamp)
Process all of the available routes until there are no more to process. |
void |
removeRoute(VRMLExecutionSpace space,
ROUTE route)
Remove a route object from the system. |
void |
removeRoute(VRMLExecutionSpace space,
VRMLNodeType srcNode,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
Remove a route from the system. |
void |
removeSpace(VRMLExecutionSpace space)
Remove an execution space to the system. |
void |
setErrorReporter(ErrorReporter reporter)
Register an error reporter with the manager so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. |
void |
setRouterFactory(RouterFactory fac)
Set the factory needed to create new router instances for a new execution space. |
void |
updateRoutes()
Notification that the route manager should now propogate all added and removed routes from this list into the core evaluatable space. |
void |
updateSpaces()
Notification that the route manager should now propogate all added and removed spaces from this list into the core evaluatable system. |
| Method Detail |
public void setErrorReporter(ErrorReporter reporter)
reporter - The instance to use or nullpublic void setRouterFactory(RouterFactory fac)
fac - The factory instance to usepublic boolean processRoutes(double timestamp)
timestamp - The timestamp for when these routes should be executed
public void addRoute(VRMLExecutionSpace space,
VRMLNodeType srcNode,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
space - The execution space for the routesrcNode - The source node of the routesrcIndex - The index of the source fielddestNode - The destination node of the routedestIndex - The index of the destination field
public void addRoute(VRMLExecutionSpace space,
ROUTE route)
space - The execution space for the routeroute - The object to add
public void removeRoute(VRMLExecutionSpace space,
VRMLNodeType srcNode,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
space - The execution space for the routesrcNode - The source node of the routesrcIndex - The index of the source fielddestNode - The destination node of the routedestIndex - The index of the destination field
public void removeRoute(VRMLExecutionSpace space,
ROUTE route)
space - The execution space for the routeroute - The object to removepublic void addSpace(VRMLExecutionSpace space)
space - The execution space to addpublic void removeSpace(VRMLExecutionSpace space)
space - The execution space to addpublic void updateSpaces()
public void updateRoutes()
public void clear()
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||