|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjmathlib.core.interpreter.Interpreter
public class Interpreter
This is the main interface for the program. Any interface to the MathLib program would access it through the functions exposed by this class.
| Field Summary | |
|---|---|
GlobalValues |
globals
global pointers and values |
boolean |
throwErrorsB
for testing purposes additional throwing of errors can be enables |
| Constructor Summary | |
|---|---|
Interpreter(boolean _runningStandalone)
Constructs the interpreter and sets the constants |
|
| Method Summary | |
|---|---|
void |
displayText(java.lang.String text)
displays a string to the outputPanel |
java.lang.String |
executeExpression(java.lang.String expression)
execute a single line. |
boolean[][] |
getArrayValueBoolean(java.lang.String name)
|
double[][] |
getArrayValueIm(java.lang.String name)
get the imaginary values of a an array |
double[][] |
getArrayValueRe(java.lang.String name)
get the real values of a an array |
JMathLibOutput |
getOutputPanel()
returns the panel to write any text to |
java.lang.String |
getResult()
Return the result of the last calculation |
boolean |
getScalarValueBoolean(java.lang.String name)
|
double |
getScalarValueIm(java.lang.String name)
get the imaginary part of a scalar variable |
double |
getScalarValueRe(java.lang.String name)
get the real part of a scalar variable |
java.lang.String |
getString(java.lang.String name)
Return the result of the last calculation |
void |
save()
saves the variable list |
void |
setArray(java.lang.String name,
double[][] valueRe,
double[][] valueIm)
Store an array variable in jmathlib's workspace |
void |
setOutputPanel(JMathLibOutput _outputPanel)
sets the panel to write any text to |
void |
setScalar(java.lang.String name,
double valueRe,
double valueIm)
store a scalar variable in jmathlib's workspace |
void |
setStatusText(java.lang.String _status)
write status message to GUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public GlobalValues globals
public boolean throwErrorsB
| Constructor Detail |
|---|
public Interpreter(boolean _runningStandalone)
_runningStandalone - = true if this is being used from an application| Method Detail |
|---|
public void setOutputPanel(JMathLibOutput _outputPanel)
_outputPanel - = the panel to write to, must implement the
MathLibOutput interfacepublic JMathLibOutput getOutputPanel()
public void setStatusText(java.lang.String _status)
_status - public void displayText(java.lang.String text)
text - = the text to displaypublic void save()
public java.lang.String executeExpression(java.lang.String expression)
expression - = the line to execute
public double getScalarValueRe(java.lang.String name)
name - = name of the scalar variable
public double getScalarValueIm(java.lang.String name)
name - = name of the scalar variable
public boolean getScalarValueBoolean(java.lang.String name)
name -
public double[][] getArrayValueRe(java.lang.String name)
name - = name of the array
public double[][] getArrayValueIm(java.lang.String name)
name - = name of the array
public boolean[][] getArrayValueBoolean(java.lang.String name)
name -
public void setScalar(java.lang.String name,
double valueRe,
double valueIm)
name - = name of the scalarvalueRe - = real value of the scalarvalueIM - = imaginary value of the scalar
public void setArray(java.lang.String name,
double[][] valueRe,
double[][] valueIm)
name - = name of the arrayvalueRe - = real values of the arrayvalueIM - = imaginary values of the arraypublic java.lang.String getResult()
public java.lang.String getString(java.lang.String name)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||