Class MrpEvalConsole

java.lang.Object
com.singularsys.jepexamples.consoles.Console
com.singularsys.extexamples.consoles.MrpEvalConsole

public class MrpEvalConsole extends Console
Console using the ReEval class rather than the RpEvaluator wrapper.
Author:
Richard Morris
See Also:
  • Constructor Details

    • MrpEvalConsole

      public MrpEvalConsole()
  • Method Details

    • initialise

      public void initialise()
      Description copied from class: Console
      sets up all the needed objects.
      Overrides:
      initialise in class Console
    • main

      public static void main(String[] args)
      Parameters:
      args -
    • processEquation

      public Object processEquation(Node node) throws JepException
      Description copied from class: Console
      Performs the required operation on a node. Typically, evaluates the node and prints the value.
      Overrides:
      processEquation in class Console
      Parameters:
      node - Node representing expression
      Returns:
      The result of the calculation
      Throws:
      JepException - if a Parse or evaluation error
    • printIntroText

      public void printIntroText()
      Description copied from class: Console
      Prints introductory text.
      Overrides:
      printIntroText in class Console
    • setIndexShift

      public void setIndexShift(int i)
      Description copied from class: Console
      Set the index shift for arrays.
      Overrides:
      setIndexShift in class Console
      Parameters:
      i - the shift, either 0 or 1
    • setMonitor

      public void setMonitor(String[] args)
      Description copied from class: Console
      Sets up monitoring of the call tree. Calls Console.setEvaluator(Evaluator) with a MonitoringEvaluator, sub-classes may need to override this method disable this feature.
      Overrides:
      setMonitor in class Console
      Parameters:
      args - second argument can be one of "off", "calls" or "times"
    • setEvaluator

      public void setEvaluator(Evaluator ev)
      Description copied from class: Console
      Sets the evaluator used. Default method simple calls Jep.setComponent(com.singularsys.jep.JepComponent) with the evaluator.
      Overrides:
      setEvaluator in class Console
      Parameters:
      ev - the evaluator to use