tools.blend
Class OrNode

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

public class OrNode
extends Node

An OR node tries all children one by one. If any pass then the path is short-circuited to the parent's pass. If all fail then the flow continues with the parent's fail.


Constructor Summary
OrNode(Node parent, CapNode cap)
          This constructs a new OR node
 
Method Summary
 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

OrNode

public OrNode(Node parent,
              CapNode cap)
This constructs a new OR node

Parameters:
parent - the parent node
cap - the root of the expression
Method Detail

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