IGLib
1.5
The IGLib base library for development of numerical, technical and business applications.
|
Class encapsulating a command-line shell. Used as embedded shell application that can be installed on command-line interpreters and runnable scripts. More...
Public Member Functions | |
ShellApplication () | |
void | Main (string[] args) |
Entry point of the application. More... | |
override void | AddDefaultAssemblies () |
Adds assemblies to be automatically referenced by loaded scripts. More... | |
override void | AplicationMain (string[] args) |
Default main method for the current shell application. More... | |
override void | TestMain (string[] args) |
Runs the shell interpreter. More... | |
![]() | |
ApplicationCommandlineBase () | |
Constructor. More... | |
Protected Member Functions | |
override CommandLineApplicationInterpreter | CreateInterpreter () |
Creates and returns application's command-line interpreter. More... | |
![]() | |
virtual void | SetUserName (string userName) |
Sets name of the current user. This method is provided to enable testing code under another user name. Setting to null anihilates effect of previous calls. More... | |
int | GetScriptNumArguments () |
Returns the number of script run method's arguments (i.e. arguments that are stored in DirectArguments and InterpreterArguments). If there are different numbers of More... | |
virtual void | SetScriptNumArguments (int numArguments) |
Sets the number of script run method's arguments to the specified number. Reallocates argument arrays if necessary. More... | |
virtual void | SetScriptArgument (int whichArgument, string argumentValue) |
Sets the specified script argument; updates array of arguments for running script directly as well as arguments for running script through interpreter. More... | |
virtual string | GetScriptArgument (int whichArgument) |
Gets the specified string arguments, as it is currently set. More... | |
Additional Inherited Members | |
![]() | |
string | OptDir |
Optimization directory that contains data and message files of optimization server. More... | |
![]() | |
const string | ConstScriptTests = "ScriptTests" |
Selecting constant fot TEST script. More... | |
const string | ConstScriptCustomApp = "ScriptCustomApp" |
Selecting constant fot CUSTOM script. More... | |
const string | ConstInteractive = "Interactive" |
Selecting constant for interactive run. More... | |
string | ConstRunInteractive = "Interactive" |
Interpreter command for running in interactive mode. More... | |
string | ConstRunScript = "RunScript" |
Interpreter command for running dynamic scripts. More... | |
string | ScriptLocation = null |
Location of the script to be loaded. More... | |
string | ScriptGroupChoice |
Main selector for script that is run. More... | |
string | _scriptChoice |
Type | _scriptType |
string | ScriptAction |
Selector for script action. More... | |
string[] | DirectArguments = null |
Script arguments used when script is run directly by creating a script object. More... | |
string[] | InterpreterArguments = null |
Interpreter arguments used when script is run through interpreter. More... | |
string | DefaultActiveDir |
Default active directory. The current directory will be set to this directory. More... | |
ILoadableScript | _scriptToRun |
bool | RunThroughInterpreter = false |
Whether script is loaded and run through interpreter (alternative is direct construction of script class). More... | |
string | _userNameLowerCase = null |
CommandLineApplicationInterpreter | TestInterpreter |
Application interpreter for running test scripts. More... | |
![]() | |
string | ScriptChoice [get, set] |
Name of the selected script type that is run. More... | |
Type | ScriptType [get, set] |
Selected type of the script to be run. More... | |
ILoadableScript | ScriptToRun [get, set] |
Script to be run. More... | |
virtual string | UserNameLowerCase [get] |
Gets name of the current user with all letters converted to lower case (in order to avoid ambiguities). More... | |
virtual bool | IsUserIgor [get] |
Returns true if the current user logged on the computer is Igor, or false otherwise. More... | |
virtual bool | IsUserTadej [get] |
Returns true if the current user logged on the computer is Tadej, or false otherwise. More... | |
Class encapsulating a command-line shell. Used as embedded shell application that can be installed on command-line interpreters and runnable scripts.
$A Igor Jan01;
InterpreterType | : | CommandLineApplicationInterpreter | |
InterpreterType | : | new() |
|
inline |
|
inline |
Entry point of the application.
args | Application arguments. |
|
inlineprotectedvirtual |
Creates and returns application's command-line interpreter.
Implements IG.Lib.ApplicationCommandlineBase.
References IG.Lib.CommandLineApplicationInterpreter.RegisterSystemPriorityUpdating().
|
inlinevirtual |
Adds assemblies to be automatically referenced by loaded scripts.
Reimplemented from IG.Lib.ApplicationCommandlineBase.
References IG.Lib.ScriptLoaderBase.AddDefaultAssemblies().
|
inlinevirtual |
Default main method for the current shell application.
args | Command-line argumets passed when the application is run. |
$A Igor xx Nov09 Dec11;
Reimplemented from IG.Lib.ApplicationCommandlineBase.
References IG.Lib.Util.OutputLevel.
|
inlinevirtual |
Runs the shell interpreter.
args | Commandline arguments. |
Standard scheme for IGLib-based test applications.
$A Igor Dec12;
Implements IG.Lib.ApplicationCommandlineBase.
References IG.Lib.LoadableScriptBase.DefaultOutputLevel.