| IGLib 1.6.0 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Properties | Private Attributes | List of all members
IG.Lib.CommandLineApplicationScriptInterpreter Class Reference

Command-line interpreters adapted for executing script commands. More...

Inheritance diagram for IG.Lib.CommandLineApplicationScriptInterpreter:
[legend]
Collaboration diagram for IG.Lib.CommandLineApplicationScriptInterpreter:
[legend]

## Public Member Functions
override string | Run (string commandName, params string[] commandArguments)
| Runs the specified command with specified name, installed on the current application object. More...
virtual bool | Script_ContainsScriptCommand (string commandName)
| Returns true if the specified command is script command (i.e. its first argument is command-name and it is run through the Script_CommandAdapter object). More...
Public Member Functions inherited from IG.Lib.CommandLineApplicationInterpreter
delegate string | ApplicationCommandDelegate (ICommandLineApplicationInterpreter interpreter, string commandName, string[] args)
| Delegate for commands that are installed on interpreter. More...
delegate void | ModuleDelegate (string modulename, ICommandLineApplicationInterpreter interpreter)
| Delegate for installing a module on the interpreter. More...
| CommandLineApplicationInterpreter ()
| Creates a new MessyApplication object initialized with some basisc applications. More...
| CommandLineApplicationInterpreter (bool caseSensitive)
| Construct a new commandline interpreter object initialized with some basisc commands. More...
virtual string | GetVariable (string varName)
| Returns the value of the specified variable of the current command line interpreter. null is returned if the specified variable does not exist. More...
virtual string | SetVariable (string varName, string value)
| Sets the specified variable to the specified value. More...
virtual string | ClearVariable (string varName)
| Clears (removes) the specified variable. More...
virtual string | PrintVariable (string varName)
| Prints the specified variable. More...
virtual string[] | GetArguments (string commandLine)
| Parses a command line and extracts arguments from it. Arguments can be separated according to usual rules for command-line arguments: spaces are separators, there can be arbitraty number of spaces, and if we want an argument to contain spaces, we must enclose it in double quotes. Command line can also contain the command name followed by arguments. In this case it is treated in the same way, and command can be obtained simply as the first string in the returned array. More...
virtual string | RunFile (string filePath)
| Runs all commands that are written in a file. Each line of a file is interpreted as a single command, consisting of command name followed by arguments. More...
virtual string | RunInteractive ()
| Reads commands one by one from the standard input and executes them. More...
string | ExpressionEvaluatorInteractive ()
| Runs interpreter's expression evaluator interactively. More...
string | ExpressionEvaluatorEvaluate (string[] args)
string[] | GetCommands ()
| Returns an array of installed commands. More...
virtual bool | ContainsCommand (string commandName)
| Returns true if the interpreter contains a command with specified name, false otherwise. More...
virtual string | RunRepeat (string[] args)
| Runs command several times where the first argument is number of repetitions, second argument is command name. Extracts command name and runs the corresponding command delegate. Before running it, arguments for the application delegate are extracted and then passed to the delegate. More...
virtual string | RunRepeatVerbose (string[] args)
| Runs command several times where the first argument is number of repetitions, second argument is command name. Extracts command name and runs the corresponding command delegate. Before running it, arguments for the application delegate are extracted and then passed to the delegate. More...
virtual string | RunRepeatSilent (string[] args)
| Runs command several times where the first argument is number of repetitions, second argument is command name. Extracts command name and runs the corresponding command delegate. Before running it, arguments for the application delegate are extracted and then passed to the delegate. More...
virtual string | RunRepeatSpecificOutputLevel (string[] args)
| Runs command several times where the first argument is number of repetitions, second argument is command name. Extracts command name and runs the corresponding command delegate. Before running it, arguments for the application delegate are extracted and then passed to the delegate. More...
virtual string | RunRepeat (int outputLevel, string[] args)
| Runs command several times where the first argument is number of repetitions, second argument is command name. Extracts command name and runs the corresponding command delegate. Before running it, arguments for the application delegate are extracted and then passed to the delegate. More...
virtual string | RunTryCatch (int outputLevel, string[] args)
| Runs command in a try-catch block, where first argument is command name. Extracts command name and runs the corresponding command delegate. Before running it, arguments for the application delegate are extracted and then passed to the delegate. More...
string | RunWithoutModifications (string commandName, params string[] commandArguments)
| Runs the specified command with specified name, installed on the current application object, without any modifications of the command arguments. More...
string | Run (string[] args)
| Runs command where the first argument is command name. Extracts command name and runs the corresponding command delegate.Before running it, arguments for the application delegate are extracted and then passed to the delegate. More...
void | AddParallelCommand (CommandLineJobContainer commandData)
| Adds a new parallel command data to the list of commands executed by in parallel. More...
CommandLineJobContainer | GetParallelCommandData (int id)
| Returns the command data object of the parallel command that with the specified ID. More...
void | PrintParallelCommands (bool printAll)
| Prints the commands that were scheduled for parallel execution, together with their current status, results and execution times (when available). More...
virtual void | UpdateThreadPriorityFromSystem ()
| Updates thread priority (property ThreadPriority) of the interpreter to the current global thread priority (the UtilSystem.ThreadPriority property). More...
void | RegisterSystemPriorityUpdating ()
| Registers the UpdateThreadPriorityFromSystem method as "event handler" for system priority changes. After registration, this method will be called every time the value of the UtilSystem.ThreadPriority property changes. More...
void | UnregisterSystemPriorityUpdating ()
| Unregisters the UpdateThreadPriorityFromSystem method as "event handler" for system priority changes. More...
int[] | RunParallelRepeat (int numRepeat, string command, string[] commandArguments)
| Runs the specified command with arguments the specified number of times in parallel threads by using the interpreter's job dispatcher with corresponding parallel servers. More...
int | RunParallel (string command, string[] commandArguments)
| Runs she specified command with arguments once in a parallel thread by using the interpreter's job dispatcher with corresponding parallel servers. More...
virtual string | RunAsync (string[] args)
| Runs a command asynchronously where the first argument is command name. Extracts command name and runs the corresponding application delegate. Before running it, arguments for the application delegate are extracted and then passed to the delegate. More...
virtual string | RunAsync (string commandName, params string[] commandArguments)
| Runs the command with specified name (installed on the current interpreter object) asynchronously. More...
bool | AsyncIsCompleted (int id)
| Returns true if the asynchronous command execution identified by id has completed, and false otherwise. More...
bool | AsyncIsAllCompleted ()
| Returns true if all asynchronous command executions have completed, and false otherwise. More...
void | AsyncWaitAll ()
| Waits until all asynchronously commands that have been eventually executed by the current interpreter, complete. More...
string | AsyncWait (int callId)
| Waits for the specified asynchronous command (specified by command ID) to complete. More...
virtual void | AddCommand (string commandName, ApplicationCommandDelegate commandDelegate)
| Adds command with the specified name. More...
virtual void | RemoveCommand (string commandName)
| Removes the command with the specified name. More...
virtual void | RemoveAllCommands ()
| Removes all commands from the current interpreter. More...
virtual void | AddModule (string moduleName, ModuleDelegate moduleDelegate)
| Adds a new module to the interpreter. This adds an initialization function (via a delegate) which is executed when module module initialization is performed. More...
virtual void | LoadModule (string moduleName)
| Loads and initializes the specified module. More...
virtual string | ModuleTestCommandName (string modulename)
| Returns the standard name for the command that gets installed when a module is loaded. More...
virtual bool | IsModuleLoaded (string moduleName)
| Returns true if the specified module has been loaded on the interpreter, false if not. More...
virtual string | RunScriptFile (string scriptFilePath, string[] initAndRunArgs)
| Dynamically loads (temporarily, just for execution of the current commad) a class form the script contained in the specified file and executes its executable method. The file must contain the script that is dynamically loaded and executed, in form of definition of the appropriate class of type ILoadableScript. The dynamically loadable script class is loaded from the file and instantiated by the LoadableScriptInterpreter interpreter that is based on loadable scripts. More...
void | LoadScript (string newCommandName, string scriptFilePath, string[] initArgs)
| Dynamically loads (compiles and instantiates) a loadable script class contained in the specified file, and installs a new command on LoadableScriptInterpreter and on the current interpreter, based on the dynamically created instance of the loaded (dynamically compiled) class. More...
virtual string | RunLoadedScript (string commandName, string[] arguments)
| Executes the specified command that has been dynamically loaded form a script. More...
string[] | GetLoadableScriptReferencedAssemblies ()
| Returns an array of assemblies that are currently referenced by the script loader that takes care of loading the dynamic scripts. More...
InterpreterPipeServer | CreatePipeServer (string pipeName, string serverName=null, bool createCommand=false, int outputLevel=3)
| Creates and registers a new interpreter's named pipe server. More...
string | RemovePipeServers (params string[] serverNames)
| Removes the specified interpreter's named pipe servers. Servers are stopped and their pipes closed. Returns a string contaiing information about the removed servers. More...
string | PipeServerInfo (string serverName=null)
| Returns a string containing informattion on the installed named pipe servers. More...
InterpreterPipeClient | CreatePipeClient (string pipeName, string clientName=null, bool createCommand=false, int outputLevel=3)
| Creates and registers a new interpreter's named pipe client. More...
string | RemovePipeClients (params string[] clientNames)
| Removes the specified interpreter's named pipe clients. Client's pipes are closed. Returns a string contaiing information about the removed clients. More...
string | PipeClientInfo (string clientName=null)
| Returns a string containing informattion on the installed named pipe clients. More...
string | PipeClientGetServerResponse (string clientName, string commandLineString)
| Sends the specified command to the corresponding pipe serverr and reads and returns its response. More...
Public Member Functions inherited from IG.Lib.ICommandLineApplicationInterpreter
string | Run (string commandName, string[] args)
| Runs the command with specified name, installed on the current application object. More...
void | AddCommand (string appName, CommandLineApplicationInterpreter.ApplicationCommandDelegate appMain)
| Adds command with the specified name. More...
void | AddModule (string moduleName, CommandLineApplicationInterpreter.ModuleDelegate moduleDelegate)
| Adds a new module to the interpreter. This adds an initialization function (via a delegate) which is executed when module module initialization is performed. More...

## Properties
SortedList< string, string > | Script_CommandHelpStrings`[get, set]`
| Contains help strings associated with script commands installed on the SCRIPT's interpreter. This is used to distinguish script commands form usual interpreter commands. More...
Properties inherited from IG.Lib.CommandLineApplicationInterpreter
object | Lock`[get]`
| This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More...
bool | Exit`[get, protected set]`
| Whether the exit flag is set, usually causing interpreter to stop. More...
static List < CommandLineApplicationInterpreter > | Interpreters`[get]`
static CommandLineApplicationInterpreter | Global`[get]`
| Global command-line interpreter. More...
string | Name`[get, set]`
| Name of the current interpreter. More...
string | Description`[get, set]`
| Description of hte current interpreter. More...
StopWatch1 | Timer`[get]`
| Gets the stopwatch used for measuring time of commands. More...
int | OutputLevel`[get, set]`
| Level of output for some of the interpreter's functionality (e.g. asynchronous command execution). More...
bool | WarnCommandReplacement`[get, set]`
| Specifies whether a wrning should be launched whenever an installed command is being replaced. More...
virtual bool | ThrowExceptions`[get, set]`
| Flag specifying whether exceptions are thrown in interactive mode or not. More...
ExpressionEvaluatorJs | ExpressionEvaluator`[get, protected set]`
| Expression evaluator used by the current More...
List< CommandLineJobContainer > | ParallelCommands`[get]`
| List where parallel commands are stored. More...
ThreadPriority | ThreadPriority`[get, set]`
| Priority of the current interpreter main thread and threads for executing the parallel commands. More...
int | MaxNumParallelServers`[get, set]`
| Maximal number of parallel servers allowed to be created for parallel command execution. More...
List< IAsyncResult > | AsyncCommandResults`[get]`
| List of IAsyncResult objects that were returned by asynchronous command invocations. More...
bool | AsyncEndInvokeInCallback`[get, set]`
| Flag indicating whether Endinvoke must be called in the callback of asynchronous command calls. More...
virtual LoadableScriptInterpreterBase | LoadableScriptInterpreter`[get, set]`
| Interpreter based on dynamically loadable scripts. This enables installation and running of commands that are based on C# code that is dynamically compiled. Ihe object is created on first get access if it has not been assigned before. This property can be overridden in derived classes such that getter creates a dynamically loadable script - based interpreter of another kind. This is important because different script loaders (in particuar with different dynamic libraries referenced) will be used in different contexts. Another possibility is that a custom object is assigned to this property, usually in the initialization stage of the current interpreter. More...
ScriptLoaderBase | ScriptLoader`[get]`
| Gets the script loader that is used by the current command-line interpreter for dynamically loading commands from scripts. More...
SortedList< string, IpcStreamServerBase > | PipeServers`[get]`
| Array of registered pipe servers, accessible through server name. More...
SortedList< string, IpcStreamClientBase > | IpcClients`[get]`
| Array of registered pipe clients, accessible through client name. More...
Properties inherited from IG.Lib.ICommandLineApplicationInterpreter
string | Name`[get, set]`
| Name of the current interpreter. More...
string | Description`[get, set]`
| Description of hte current interpreter. More...
bool | Exit`[get]`
| Whether the exit flag is set, usually causing interpreter to stop. More...
StopWatch1 | Timer`[get]`
| Gets the stopwatch used for measuring time of commands. More...
int | OutputLevel`[get, set]`
| Level of output for some of the interpreter's functionality (e.g. asynchronous command execution). More...
bool | WarnCommandReplacement`[get, set]`
| Specifies whether a wrning should be launched whenever an installed command is being replaced. More...
LoadableScriptInterpreterBase | LoadableScriptInterpreter`[get, set]`
| Interprater based on dynamically loadable scripts. This enables installation and running of commands that are based on C# code that is dynamically compiled. Ihe object is created on first get access if it has not been assigned before. This property can be overridden in derived classes such that getter creates a dynamically loadable script - based interpreter of another kind. This is important because different script loaders (in particuar with different dynamic libraries referenced) will be used in different contexts. Another possibility is that a custom object is assigned to this property, usually in the initialization stage of the current interpreter. More...
Properties inherited from IG.Lib.ILockable
object | Lock`[get]`

## Private Attributes
SortedList< string, string > | _script_CommandHelpStrings

## Additional Inherited Members
Static Public Member Functions inherited from IG.Lib.CommandLineApplicationInterpreter
static void | ExecuteSystemCommand (string[] args)
| Executes the specified system commmand and blocks until the execution completes. More...
static void | ExecuteSystemCommand (string command, params string[] args)
| Executes system command with arguments. More...
Public Attributes inherited from IG.Lib.CommandLineApplicationInterpreter
const bool | DefaultCaseSensitive = false
| Default value of the flg indicating whether command names are case sensitive. More...
const string | DefaultName = "ApplicationIntepreter"
| Default interpreter name. More...
const string | AutoGlobalName = "AutomaticGlobalInterpreter"
const string | AutoGlobalDescription = "Automatically created global command-line interpreter."
StopWatch1 | _timer
Static Public Attributes inherited from IG.Lib.CommandLineApplicationInterpreter
static int | DefaultOutputLevel = 1
static bool | DefaultWarnCommandReplacement = true
Protected Member Functions inherited from IG.Lib.CommandLineApplicationInterpreter
virtual bool | IsVariableReference (string str)
| Returns true if the specified string represents a variable reference, false otherwise. More...
virtual string | SubstituteVariableReference (string str)
| Returns value of the referenced variable if the specified string represents a variable reference (begins with the variableStart character, usually '$'), otherwise the original sting is returned. More...
virtual void | ExecuteSystemCommandsInteractive ()
| Reads commands with their arguments ont by one from the console and executes them as system commands. More...
void | AsyncRunCallback (IAsyncResult ar)
| Callback method for asynchronous command executions. More...
virtual string | CmdSetVariable (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Sets the specified varuable to the specified value. Usage: More...
virtual string | CmdGetVariable (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Gets the specified varuable and returns its value (or null if the variable does not exist). Variable name must be the only argument of the command. More...
virtual string | CmdClearVariable (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Clears the specified varuable. Variable name must be the only argument of the command. More...
virtual string | CmdPrintVariable (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Prints the specified varuable. Variable name must be the only argument of the command. More...
virtual string | CmdWriteLine (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Prints concatenated argument with spaces between them. More...
virtual string | CmdWrite (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Prints concatenated argument with spaces between them. More...
virtual string | CmdRunFile (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Runs a file by running all its lines in the current interpreter. File name must be the only argument of the command. More...
virtual string | CmdRunRepeatVerbose (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Runs another command repetitively the specified number of times. First argument must be the number of times command is run, the second argument must be command to be run repetitively, and the rest of the arguments are passed to that command as its arguments. More...
virtual string | CmdRunRepeat (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Runs another command repetitively the specified number of times. First argument must be the number of times command is run, the second argument must be command to be run repetitively, and the rest of the arguments are passed to that command as its arguments. More...
virtual string | CmdTryRun (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Runs another command in a try-catch block, such that if command throws an exception execution is not broken. The second argument must be command to be run, and the rest of the arguments are passed to that command as its arguments. More...
virtual string | CmdThtrowExceptions (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Sets the flag for rethrowing exceptions in the interaction mode. Optional boolean arguemnt, default is true. More...
virtual string | CmdRunInteractive (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Runs interpreter commands interactively. Reads commands one by one from console and executes them, until only Enter is pressed.. More...
virtual string | CmdRunSystem (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Runs the specified command-line by the operating system. The first argument is the command to be executed while the following arguments are arguments to this command. If there are no arguments then user is requested to insert commands interactively. More...
virtual string | CmdExpressionEvaluatorInteractive (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Runs the built in expression evaluator. More...
virtual string | CmdSetPriority (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Interpreter command. Sets the priority of the current process. More...
virtual string | CmdRunParallel (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Interpreter command. Runs the specified command-line in parallel thread. More...
virtual string | CmdRunParallelRepeat (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Interpreter command. Runs the specified command-line several times in the specified number of parallel threads. More...
virtual string | CmdPrintParallelCommands (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Interpreter command. Prints data about commands executed in parallel threads. More...
virtual string | CmdRunAsync (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Runs the specified command-line asynchronously. More...
virtual string | CmdAsyncWaitResults (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Wait until asynchronously invoked command with the specified ID (first argument, must represent an int) completes. More...
virtual string | CmdAsyncCompleted (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Returns a flag indicating whether the asynchroneous command invocation identified by the specified ID (first argument, must represent an int) has completed. More...
virtual string | CmdSleepSeconds (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Sleeps (suspends execution of the executing thread) for the specified number of seconds. More...
virtual string | CmdLoadModule (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Loads the specified module (whos name must be the first argument) and performs its initialization. If there are more than 1 arguments then the rest of the arguments specify a command and (if more than 1) its arguments, and the specified command is also run. More...
virtual string | CmdIsModuleLoaded (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Executinon method for command that checks if module is loaded. Writes to condole whether module is loaded or not, and returns "1" if module is loaded and "0" if not. More...
virtual string | CmdModuleTestCommand (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Executinon method for test command that is installed when a module is installed. This is a command that enables to verify that a module with the specified name has been installed. More...
virtual string | CmdTestFromTestModules (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Executinon method for test command, which just prints its name and arguments. This is a replacement for usuel test command, which gets installed when one of the two basic test modules are installed. More...
virtual string | CmdPipeServerCreate (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Creates a new server that listens for interpreter commands on a named pipe, executes them, and writes result back to the named pipe. Command arguments are pipe name and server name (optional, if not specified then server name is the same as pipe name). More...
virtual string | CmdPipeServersRemove (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Removes the spcified (or all, if names are not specified) named pipe servers. Command arguments are names of the pipe servers to be removed. If none is specified then all pipe servers installed on the interperter are removed. More...
virtual string | CmdPipeServerInfo (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
  | Command. Prints and returns inormation on the installed named pipe servers. Optional command argument is server name. If not specified then information about all installed servers is printed and returned. Parameters
  cmdName | Command name.
Returns A string containing the information on pipe servers. More...
virtual string | CmdPipeClientCreate (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Creates a new client to the interpreter pipe server. The client can send command to the server listening on the specified named pipe, and recieves responses from the server and returns them. Command arguments are pipe name and client name (optional, if not specified then server name is the same as pipe name). More...
virtual string | CmdPipeClientsRemove (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Command. Removes the spcified (or all, if names are not specified) named pipe clients. Command arguments are names of the pipe clients to be removed. If none is specified then all pipe clients installed on the interperter are removed. More...
virtual string | CmdPipeClientInfo (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
  | Command. Prints and returns inormation on the installed named pipe clients. Optional command argument is client name. If not specified then information about all installed clients is printed and returned. Parameters
  cmdName | Command name.
Returns A string containing some basic data on the created pipe client. More...
virtual string | CmdPipeClientGetServerResponse (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
  | Command. Sends the specified command to the corresponding pipe serverr and reads and returns its response. Command argument is the (interpreter's) name of the pipe client followed by command and eventual arguments sent to the server. Parameters
  cmdName | Command name.
Returns Server response. More...
virtual string | CmdRunInternalScriptClass (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Interpreter command. Dynamically creates and runs an internal script object, i.e. an object of the class that is already compiled in the code. Interpreter command arguments: The first argument must be a full name of the script class whose object is run. The rest of the arguments (if any) are directly transferred to the executable method of the script and are also used as argument to script initialization method. More...
virtual string | CmdRunScriptFile (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Interpreter command. Dynamically loads (temporarily, just for execution of the current commad) a class form the script contained in the specified file and executes its executable method. The file must contain the script that is dynamically loaded and executed, in form of definition of the appropriate class of type ILoadableScript . The dynamically loadable script class is loaded from the file and instantiated by the LoadableScriptInterpreter loadable script-based interpreter object. Interpreter command arguments: Path to the file containing loadable script must be the first argument to the method. The rest of the arguments (if any) are directly transferred to the executable method of the script. More...
virtual string | CmdLoadScript (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Interpreter command. Dynamically loads (compiles and instantiates) a loadable script class contained in the specified file, and installs a new command on LoadableScriptInterpreter and on the current interpreter, based on the dynamically allocated instance of the loaded (dynamically compiled) class. Required arguments to the interpreter command are: More...
virtual string | CmdRunLoadedScript (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Interpreter command. Runs a command based on dynamically loaded loadable script class. Arguments passed to this command are directly passed on to the dynamically loaded script class installed on LoadableScriptInterpreter under the same cmdName . Typically, the command that is executed by the current method, has been previously installed by the CmdLoadScript(...) method. More...
virtual string | WriteLoadableScriptReferencedAssemblies (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Interpreter command. Writes to the console the assemblies that are currently referenced by compiler used for dynamic loading of scripts. This information can be used for control if something goes wrong with dynamic script loading. More...
virtual string | CmdExit (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Execution method that exits the interpreter. More...
virtual string | CmdHelp (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Execution method for applications help. More...
virtual string | CmdAbout (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Execution method that prints some information about the application. More...
virtual string | CmdApplicationInfo (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Execution method that prints some information about the current application. More...
virtual string | CmdComment (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Execution method that does nothing (for comments). More...
virtual string | CmdPrintCommands (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Execution method for command that prints names of all installed applications. More...
virtual string | CmdTestProduct (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Executinon method for test command, which just prints its name and arguments. More...
virtual string | CmdTest (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Executinon method for test command, which just prints its name and arguments. More...
virtual string | CmdTestSpeed (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Executinon method for TestSpeed command, performs test of speed of numerical computations on LU decomposition, and outputs the result and comparison with reference results (usually achieved on Igor's computer). More...
virtual string | CmdTestSpeedLong (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Executinon method for TestSpeedLong command, performs a longer test of speed of numerical computations on QR decomposition, and outputs the result and comparison with reference results (usually achieved on Igor's computer). More...
virtual string | CmdTestQR (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Executinon method for TestQR command, performs test of QR decomposition. More...
virtual double | TestComputationalTimesQR (int numEq, int outLevel)
| Test of QR decomposition. Writes times necessary for all steps. More...
virtual string | CmdTestLU (ICommandLineApplicationInterpreter interpreter, string cmdName, string[] args)
| Executinon method for TestLU command, performs test of LU decomposition. More...
virtual double | TestComputationalTimesLU (int numEq, int outLevel)
| Test of LU decomposition. More...
Protected Attributes inherited from IG.Lib.CommandLineApplicationInterpreter
bool | _caseSensitive = false
SortedDictionary< string, ApplicationCommandDelegate > | _commands = new SortedDictionary<string, ApplicationCommandDelegate>()
SortedDictionary< string, string > | _variables = new SortedDictionary<string, string>()
SortedDictionary< string, ModuleDelegate > | _modules = new SortedDictionary<string, ModuleDelegate>()
List< String > | _loadedModules = new List<string>()
string | _name = DefaultName
string | _sescription = "Application's command-line interpreter."
string | _description
char | variableStart = '$'
bool | _exit = false
int | _outputLevel = DefaultOutputLevel
| Default level of output for some of the interpreters' functionality (e.g. asynchronous command execution). More...
ExpressionEvaluatorJs | _expressionEvaluator
List< CommandLineJobContainer > | _parallelCommands
ThreadPriority | _threadPriority = UtilSystem.ThreadPriority
bool | _systemPriorityUpdatesRegistered = false
| Whether the "event" handler for system priprity changes has already been registered. More...
int | _maxNumParallelServers = 0
string | _ModuleTestCommandPrefix = "TestModule_"
const string | TestSpeedReferenceSystem = "Intel Core i7 2.8 GHz"
| Description of reference configuration. More...
const int | TestSpeedNumEq = 500
| Number of equations used to test speed of numerical computations. More...
const double | TestSpeedReferenceTime = 0.640917
| Reference execution time for speed test for numerical operations. More...
const int | TestSpeedLongNumEq = 1000
| Number of equations used to test speed of numerical computations. More...
const double | TestSpeedLongReferenceTime = 63.9688
| Reference execution time for speed test for numerical operations. More...
Static Protected Attributes inherited from IG.Lib.CommandLineApplicationInterpreter
static List < CommandLineApplicationInterpreter > | _interpreters = new List<CommandLineApplicationInterpreter>()
static int | DefaultNumEquations = 1000

## Detailed Description

Command-line interpreters adapted for executing script commands.

$A Igor Nov08;

## Member Function Documentation

override string IG.Lib.CommandLineApplicationScriptInterpreter.Run | ( | string | commandName,
|  | params string[] | commandArguments
| ) |  |
| inline virtual

Runs the specified command with specified name, installed on the current application object.

Parameters

  AppName | Command name.
  commandArguments | Command arguments.

This command overrides the original Run commands in such a way that it treats script commands differently form the original interpreter commands.

If a command is script command (i.e. contained on the Script_CommandHelpStrings list) then its arguments will contain the command name, otherwise they will not.

Reimplemented from IG.Lib.CommandLineApplicationInterpreter.

virtual bool IG.Lib.CommandLineApplicationScriptInterpreter.Script_ContainsScriptCommand | ( | string | commandName | ) |
| inline virtual

Returns true if the specified command is script command (i.e. its first argument is command-name and it is run through the Script_CommandAdapter object).

Parameters

  commandName | Name of the command that is queried.

A command is considered script command if it is contained on the Script_CommandHelpStrings list.

## Member Data Documentation

SortedList<string, string> IG.Lib.CommandLineApplicationScriptInterpreter._script_CommandHelpStrings
| private

## Property Documentation

SortedList<string, string> IG.Lib.CommandLineApplicationScriptInterpreter.Script_CommandHelpStrings
| get set

Contains help strings associated with script commands installed on the SCRIPT's interpreter. This is used to distinguish script commands form usual interpreter commands.

Referenced by IG.Lib.LoadableScriptBase.Script_CreateInterpreterWithoutCommands().

The documentation for this class was generated from the following file:

- igbase/interpreters/scriptloader/LoadableScriptBase.cs