Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.renderer
Class CRExternProtoCreator

java.lang.Object
  extended by org.web3d.vrml.renderer.CRExternProtoCreator

public abstract class CRExternProtoCreator
extends java.lang.Object

A class that is used to create stub instances of extern protos from their definitions.

The creator strips the definition apart and builds a runtime node based on the details and the node factory provided. The creator can handle one instance at a time, athough it will correctly parse and build nested proto declarations without extra effort.

The implementation is designed to be derived by a concrete instance and should never be created directly. This derived class should implement a method

   public RendererProtoInstance createInstanceExternalPrototypeDecl proto);
 
This method takes the declaration and creates the true proto instance, that extends CRProtoInstance. This instance is then passed to the protected createInstance() method of this class, which then does all the hard work of building the correct instance.

Version:
$Revision: 1.5 $
Author:
Alan Hudson, Justin Couch

Field Summary
protected  boolean isVRML97
          Flag to say if the current proto instance is VRML97 capable
protected  java.lang.String worldURL
          The current world's root URL
 
Constructor Summary
protected CRExternProtoCreator(java.lang.String worldURL)
          Create a new creator instance for the given world root URL
 
Method Summary
protected  void createInstance(CRProtoInstance proto)
          Build a stub instance of the proto from the given description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isVRML97

protected boolean isVRML97
Flag to say if the current proto instance is VRML97 capable


worldURL

protected java.lang.String worldURL
The current world's root URL

Constructor Detail

CRExternProtoCreator

protected CRExternProtoCreator(java.lang.String worldURL)
Create a new creator instance for the given world root URL

Parameters:
worldURL - the current world's root URL
Method Detail

createInstance

protected void createInstance(CRProtoInstance proto)
Build a stub instance of the proto from the given description.

Parameters:
proto - The extern proto to stub from

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium