tools.blend
Class CapNode

java.lang.Object
  extended by tools.blend.Node
      extended by tools.blend.CapNode

public class CapNode
extends Node

Every blend expression tree has a root (cap) node. This is that node. Its constructor reserves a unique name for the construct.


Constructor Summary
CapNode(java.lang.String tag)
          This constructs a CapNode and assigns it a unique construct name to be used by all nodes in the expression and construct.
 
Method Summary
 java.lang.String getConstructName()
          This method returns the unique name of the blend tree.
 java.lang.String getNewNodeName()
          Nodes created under this cap will have a unique name based on the cap name.
static java.lang.String reserveName(java.lang.String tag)
           
 java.lang.String whereDoIGoOnFail(Node whichChildAmI)
           
 java.lang.String whereDoIGoOnPass(Node whichChildAmI)
          When a child node finishes its processing it can either have passed or failed and needs a destination to jump to (another compare-node or the pass/fail blocks).
 
Methods inherited from class tools.blend.Node
addChild, getChildIndex, getName, getStartingCompareNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapNode

public CapNode(java.lang.String tag)
This constructs a CapNode and assigns it a unique construct name to be used by all nodes in the expression and construct.

Parameters:
tag -
Method Detail

reserveName

public static java.lang.String reserveName(java.lang.String tag)

getNewNodeName

public java.lang.String getNewNodeName()
Nodes created under this cap will have a unique name based on the cap name. This method returns the node name for a new node.

Returns:
the new unique node name

getConstructName

public java.lang.String getConstructName()
This method returns the unique name of the blend tree.

Returns:
unique name

whereDoIGoOnPass

public java.lang.String whereDoIGoOnPass(Node whichChildAmI)
Description copied from class: Node
When a child node finishes its processing it can either have passed or failed and needs a destination to jump to (another compare-node or the pass/fail blocks). This method returns the next place.

Specified by:
whereDoIGoOnPass in class Node
Parameters:
whichChildAmI - which child I am (AND and OR have multiple children)
Returns:
the name of the next jump destination

whereDoIGoOnFail

public java.lang.String whereDoIGoOnFail(Node whichChildAmI)
Specified by:
whereDoIGoOnFail in class Node