jmathlib.core.interpreter
Class GlobalValues

java.lang.Object
  extended by jmathlib.core.interpreter.GlobalValues

public class GlobalValues
extends java.lang.Object

This class contains the global variables, which are accessible throughout the program. These include System flags The list of contexts The interpreter object The GraphicsManager The working directory These values are all private and should be access through the getter/setter functions


Constructor Summary
GlobalValues(Interpreter _interpreter, boolean _runningStandalone, java.applet.Applet applet)
          Initialises the global values
 
Method Summary
protected  void createContext(VariableList _variables)
          Change the current context to point to the new Variable List
protected  ContextList getContextList()
          Allow access to the context list
 boolean getDebug()
           
protected  FunctionManager getFunctionManager()
           
protected  VariableList getGlobalVariables()
           
protected  GraphicsManager getGraphicsManager()
           
protected  Interpreter getInterpreter()
           
protected  PluginsManager getPluginsManager()
           
protected  Variable getVariable(java.lang.String name)
           
protected  VariableList getVariables()
           
protected  java.io.File getWorkingDirectory()
           
protected  void popContext()
          Return to the previous variable list
 void setDebug(boolean _debug)
          sets the debug flag
protected  void setWorkingDirectory(java.io.File _workingDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalValues

public GlobalValues(Interpreter _interpreter,
                    boolean _runningStandalone,
                    java.applet.Applet applet)
Initialises the global values

Parameters:
_interpreter - = the Interpreter object
_runningStandalone - = true if this was run from an application
Method Detail

getVariables

protected VariableList getVariables()
Returns:
the current variable list

getGlobalVariables

protected VariableList getGlobalVariables()
Returns:
the global variable list

getVariable

protected Variable getVariable(java.lang.String name)
Returns:
the global variable list

createContext

protected void createContext(VariableList _variables)
Change the current context to point to the new Variable List

Parameters:
_Variables - = the new list of Variables to use

popContext

protected void popContext()
Return to the previous variable list


getContextList

protected ContextList getContextList()
Allow access to the context list


getInterpreter

protected Interpreter getInterpreter()
Returns:
the interpreter object

getFunctionManager

protected FunctionManager getFunctionManager()
Returns:
the function manager

getGraphicsManager

protected GraphicsManager getGraphicsManager()
Returns:
handle to graphics manager

getPluginsManager

protected PluginsManager getPluginsManager()
Returns:
handle to plugins manager

getWorkingDirectory

protected java.io.File getWorkingDirectory()
Returns:
actual working directory

setWorkingDirectory

protected void setWorkingDirectory(java.io.File _workingDir)
Parameters:
set - working directory

getDebug

public boolean getDebug()
Returns:
the setting of the debug flag

setDebug

public void setDebug(boolean _debug)
sets the debug flag

Parameters:
_debug - = should debug information be displayed