jmathlib.core.functions
Class MFileLoader

java.lang.Object
  extended by jmathlib.core.interpreter.RootObject
      extended by jmathlib.core.functions.MFileLoader
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ErrorCodes, TokenConstants

public class MFileLoader
extends RootObject

Class for storing and managing the m- and p-functions

See Also:
Serialized Form

Field Summary
(package private)  boolean pFileCachingEnabledB
           
 
Fields inherited from interface jmathlib.core.constants.ErrorCodes
ERR_BRACKET_OPEN, ERR_BRACKET_ORDER, ERR_FUNCTION_NOT_FOUND, ERR_FUNCTION_NOT_IMPLEMENTED, ERR_INSUFFICIENT_PARAMETERS, ERR_INVALID_PARAMETER, ERR_LVALUE_REQUIRED, ERR_MATRIX_SINGULAR, ERR_NOT_SQUARE_MATRIX, ERR_OPNOTSUPPORTED, ERR_TOO_MANY_PARAMETERS, ERR_USER_ERROR, ERR_VARIABLE_NOTDEFINED, OK, OK_FUNCTION_PROCESS
 
Fields inherited from interface jmathlib.core.constants.TokenConstants
ADDSUB_PRIORITY, AND_PRIORITY, ANDAND_PRIORITY, ASSIGN_PRIORITY, BRACKET_PRIORITY, COMPARE_PRIORITY, CONCAT, MATRIX, MULDIV_PRIORITY, OR_PRIORITY, OROR_PRIORITY, PARAMETER, POWER_PRIORITY, RELATION_PRIORITY, SINGLE, ttDelimiter, ttNotSet, ttOperand, ttOperator
 
Constructor Summary
MFileLoader()
          Default constructor
 
Method Summary
 boolean getPFileCaching()
          return whether of not caching of p-files is enabled of not
 UserFunction loadMFile(java.io.File file)
           
 UserFunction loadMFile(java.lang.String directory, java.lang.String mFileName)
          reads in an .m-file
 UserFunction loadMFileViaWeb(java.net.URL codeBase, java.lang.String directoryAndFile, java.lang.String mFileName)
          loads an .m-file via the web
 UserFunction loadPFile(java.io.File file)
           
 UserFunction loadPFile(java.lang.String directory, java.lang.String pFileName)
          reads in an .p-file
 void setPFileCaching(boolean pFileCaching)
          set caching of p-file to on of off
 
Methods inherited from class jmathlib.core.interpreter.RootObject
clone, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pFileCachingEnabledB

boolean pFileCachingEnabledB
Constructor Detail

MFileLoader

public MFileLoader()
Default constructor

Method Detail

loadMFileViaWeb

public UserFunction loadMFileViaWeb(java.net.URL codeBase,
                                    java.lang.String directoryAndFile,
                                    java.lang.String mFileName)
loads an .m-file via the web

Parameters:
directory - = the directory containing the file
mFileName - = the name of the m file
Returns:
the result of the file as a FunktionToken

loadMFile

public UserFunction loadMFile(java.io.File file)

loadPFile

public UserFunction loadPFile(java.io.File file)

loadMFile

public UserFunction loadMFile(java.lang.String directory,
                              java.lang.String mFileName)
reads in an .m-file

Parameters:
directory - = the directory containing the file
mFileName - = the name of the m file
Returns:
the result of the file as a FunktionToken

loadPFile

public UserFunction loadPFile(java.lang.String directory,
                              java.lang.String pFileName)
reads in an .p-file

Parameters:
directory - = the directory containing the file
pFileName - = the name of the p file
Returns:
the result of the file as a FunktionToken

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

FOOTER

BOTTOM