jmathlib.core.functions
Class FunctionManager

java.lang.Object
  extended by jmathlib.core.functions.FunctionManager

public class FunctionManager
extends java.lang.Object

Class for storing and managing the functions being used


Nested Class Summary
(package private)  class FunctionManager.SystemFileFunctionLoader
           
 
Field Summary
private  java.util.Vector functionLoaders
           
(package private)  boolean pFileCachingEnabledB
           
private  boolean runningStandalone
           
 
Constructor Summary
FunctionManager(boolean _runningStandalone)
          Creates the function manager and defines any internal functions if this is an application then it creates a class loader to load external functions
 
Method Summary
 boolean addFunctionLoader(FunctionLoader loader)
           
 void addFunctionLoaderAt(int index, FunctionLoader loader)
           
 void checkAndRehashTimeStamps()
          For each of the FunctionLoaders, check that any cached functions are up to date.
 void clear()
           
 void clearCustomFunctionLoaders()
           
 Function findFunction(FunctionToken token)
          find a function It checks user functions then external functions then internal functions
 Function findFunctionByName(java.lang.String funcName)
           
 FunctionLoader getFunctionLoader(int index)
           
 int getFunctionLoaderCount()
           
 boolean getPFileCaching()
          return whether of not caching of p-files is enabled of not
 java.io.File getWorkingDirectory()
           
 boolean removeFunctionLoader(FunctionLoader loader)
           
 void setPFileCaching(boolean pFileCaching)
          set caching of p-file to on of off
 void setWorkingDirectory(java.io.File path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runningStandalone

private boolean runningStandalone

functionLoaders

private java.util.Vector functionLoaders

pFileCachingEnabledB

boolean pFileCachingEnabledB
Constructor Detail

FunctionManager

public FunctionManager(boolean _runningStandalone)
Creates the function manager and defines any internal functions if this is an application then it creates a class loader to load external functions

Parameters:
runningStandalone - = true if the program is running as an application
Method Detail

checkAndRehashTimeStamps

public void checkAndRehashTimeStamps()
For each of the FunctionLoaders, check that any cached functions are up to date. If some are out of date, or have been deleted, ensure that the cache it updated.


findFunction

public Function findFunction(FunctionToken token)
                      throws java.lang.Exception
find a function It checks user functions then external functions then internal functions

Parameters:
token - - The function token containing the name of the function
Returns:
the Function found
Throws:
java.lang.Exception

findFunctionByName

public Function findFunctionByName(java.lang.String funcName)
                            throws java.lang.Exception
Throws:
java.lang.Exception

clear

public void clear()

setPFileCaching

public void setPFileCaching(boolean pFileCaching)
set caching of p-file to on of off

Parameters:
pFileCaching - true= caching of p-files on; false: caching of p-files off

getPFileCaching

public boolean getPFileCaching()
return whether of not caching of p-files is enabled of not

Returns:
status of caching p-files

getFunctionLoaderCount

public int getFunctionLoaderCount()
Returns:

getFunctionLoader

public FunctionLoader getFunctionLoader(int index)
Parameters:
index -
Returns:

removeFunctionLoader

public boolean removeFunctionLoader(FunctionLoader loader)
Parameters:
loader -
Returns:

addFunctionLoader

public boolean addFunctionLoader(FunctionLoader loader)
Parameters:
loader -
Returns:

addFunctionLoaderAt

public void addFunctionLoaderAt(int index,
                                FunctionLoader loader)
Parameters:
index -
loader -

clearCustomFunctionLoaders

public void clearCustomFunctionLoaders()

setWorkingDirectory

public void setWorkingDirectory(java.io.File path)
Parameters:
path -

getWorkingDirectory

public java.io.File getWorkingDirectory()
Returns:

FOOTER

BOTTOM