anl.aida.parser
Class ASTVar

java.lang.Object
  extended by anl.aida.parser.SimpleNode
      extended by anl.aida.parser.ASTVar
All Implemented Interfaces:
Node

public class ASTVar
extends SimpleNode


Field Summary
private  FormulaArray array
           
private  java.lang.String name
           
private  int timeStep
           
 
Fields inherited from class anl.aida.parser.SimpleNode
children, DEG_TO_RAD_FACTOR, id, info, parent, parser
 
Constructor Summary
ASTVar(int id)
           
ASTVar(Parser p, int id)
           
 
Method Summary
 FormulaArray evaluate(Frame frame)
          Evaluates this Node.
 void gatherInfo(ASTTreeInfo info)
          Adds the variable info to the tree info.
 java.lang.String getName()
           
 void preprocess(Frame frame)
          Performs any node level preprocessing prior to any evaluation.
 void setName(java.lang.String name)
           
 
Methods inherited from class anl.aida.parser.SimpleNode
dump, getInfo, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setInfo, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name

timeStep

private int timeStep

array

private FormulaArray array
Constructor Detail

ASTVar

public ASTVar(int id)

ASTVar

public ASTVar(Parser p,
              int id)
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

gatherInfo

public void gatherInfo(ASTTreeInfo info)
Adds the variable info to the tree info.

Overrides:
gatherInfo in class SimpleNode
Parameters:
info - collection of tree info

preprocess

public void preprocess(Frame frame)
                throws IllegalFormulaException
Description copied from class: SimpleNode
Performs any node level preprocessing prior to any evaluation. This should only be called once on the tree. This default implementation just calls preprocess on its children.

Specified by:
preprocess in interface Node
Overrides:
preprocess in class SimpleNode
Throws:
IllegalFormulaException

evaluate

public FormulaArray evaluate(Frame frame)
                      throws IllegalFormulaException
Evaluates this Node.

Specified by:
evaluate in interface Node
Overrides:
evaluate in class SimpleNode
Parameters:
frame -
Returns:
the result of the evaluation.
Throws:
IllegalFormulaException