Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.vrml.grammar
Class PROTONodeRule  view PROTONodeRule download PROTONodeRule.java

java.lang.Object
  extended bycom.trapezium.vrml.grammar.BuiltInNodeRule
      extended bycom.trapezium.vrml.grammar.PROTONodeRule

class PROTONodeRule
extends BuiltInNodeRule

Creates the scene graph component for a PROTO instance. Grammar handled by "Build" method:

    protoNodeTypeId { nodeGuts }
  
Note: the PROTOInstance "copyBaseNodeInfo" method does not copy all nodes in the PROTO declaration body, and substitute values as indicated by IS. When this is done, PROTO checking can be done for PROTO interface fields passed through IS.

Since:
1.0
Version:
1.12, 24 April 1998, added autoDEF, 1.12, 6 Mar 1998, added Table 7 limits, 1.1, 6 Jan 1998

Field Summary
(package private)  DEFNameFactory defNameFactory
           
(package private)  NodeBodyRule nodeBodyRule
           
 
Constructor Summary
(package private) PROTONodeRule(NodeRule nodeRule)
          class constructor
 
Method Summary
(package private)  void Build(java.lang.String nodeType, int tokenOffset, com.trapezium.parse.TokenEnumerator v, com.trapezium.vrml.Scene scene, com.trapezium.vrml.VrmlElement parent)
          Create a PROTO instance and add it to the scene graph.
(package private)  void BuildNodeGuts(com.trapezium.vrml.node.Node node, int tokenOffset, com.trapezium.parse.TokenEnumerator v, com.trapezium.vrml.Scene scene)
          Create node body, and add to node.
(package private)  void setDEFNameFactory(DEFNameFactory defNameFactory)
          Set DEFNameFactory, used when scene factory overrides parser factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defNameFactory

DEFNameFactory defNameFactory

nodeBodyRule

NodeBodyRule nodeBodyRule
Constructor Detail

PROTONodeRule

PROTONodeRule(NodeRule nodeRule)
class constructor

Method Detail

setDEFNameFactory

void setDEFNameFactory(DEFNameFactory defNameFactory)
Set DEFNameFactory, used when scene factory overrides parser factory

Overrides:
setDEFNameFactory in class BuiltInNodeRule

Build

void Build(java.lang.String nodeType,
           int tokenOffset,
           com.trapezium.parse.TokenEnumerator v,
           com.trapezium.vrml.Scene scene,
           com.trapezium.vrml.VrmlElement parent)
Create a PROTO instance and add it to the scene graph.

Overrides:
Build in class BuiltInNodeRule

BuildNodeGuts

void BuildNodeGuts(com.trapezium.vrml.node.Node node,
                   int tokenOffset,
                   com.trapezium.parse.TokenEnumerator v,
                   com.trapezium.vrml.Scene scene)
Create node body, and add to node.

Node body is assumed to be: "{ ..node body.. }"

If left brace is missing, record the error, then continue parsing as if it were there.

If right bracket encountered where right brace might be expected, report the error, keep token enumerator pointing to right bracket.