예제 #1
0
 public void SetComponents(IJepComponent[] components)
 {
     foreach (IJepComponent component in components)
     {
         if (component is INumberFactory)
         {
             this._numFac = (INumberFactory)component;
         }
         else if (component is VariableFactory)
         {
             this._varFac = (VariableFactory)component;
         }
         else if (component is NodeFactory)
         {
             this._nodeFac = (NodeFactory)component;
         }
         else if (component is VariableTable)
         {
             this._varTab = (VariableTable)component;
         }
         else if (component is FunctionTable)
         {
             this._funTab = (FunctionTable)component;
         }
         else if (component is OperatorTable)
         {
             this._opTab = (OperatorTable)component;
         }
         else if (component is IParser)
         {
             this._parser = (IParser)component;
         }
         else if (component is IEvaluator)
         {
             this._evaluator = (IEvaluator)component;
         }
         else if (component is Colosoft.Text.Jep.PrintVisitor)
         {
             this._pv = (Colosoft.Text.Jep.PrintVisitor)component;
         }
     }
     this.ReinitializeComponents();
 }
예제 #2
0
 public void SetVariableFactory(VariableFactory vf)
 {
     this.vf = vf;
 }