IGLib  1.5
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
IG.Lib.ShellApplication< InterpreterType > Class Template Reference

Class encapsulating a command-line shell. Used as embedded shell application that can be installed on command-line interpreters and runnable scripts. More...

+ Inheritance diagram for IG.Lib.ShellApplication< InterpreterType >:
+ Collaboration diagram for IG.Lib.ShellApplication< InterpreterType >:

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...
 
- Public Member Functions inherited from IG.Lib.ApplicationCommandlineBase
 ApplicationCommandlineBase ()
 Constructor. More...
 

Protected Member Functions

override
CommandLineApplicationInterpreter 
CreateInterpreter ()
 Creates and returns application's command-line interpreter. More...
 
- Protected Member Functions inherited from IG.Lib.ApplicationCommandlineBase
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

- Public Attributes inherited from IG.Lib.ApplicationCommandlineBase
string OptDir
 Optimization directory that contains data and message files of optimization server. More...
 
- Protected Attributes inherited from IG.Lib.ApplicationCommandlineBase
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...
 
- Properties inherited from IG.Lib.ApplicationCommandlineBase
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...
 

Detailed Description

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;

Type Constraints
InterpreterType :CommandLineApplicationInterpreter 
InterpreterType :new() 

Constructor & Destructor Documentation

IG.Lib.ShellApplication< InterpreterType >.ShellApplication ( )
inline

Member Function Documentation

void IG.Lib.ShellApplication< InterpreterType >.Main ( string[]  args)
inline

Entry point of the application.

Parameters
argsApplication arguments.
override CommandLineApplicationInterpreter IG.Lib.ShellApplication< InterpreterType >.CreateInterpreter ( )
inlineprotectedvirtual

Creates and returns application's command-line interpreter.

Implements IG.Lib.ApplicationCommandlineBase.

References IG.Lib.CommandLineApplicationInterpreter.RegisterSystemPriorityUpdating().

override void IG.Lib.ShellApplication< InterpreterType >.AddDefaultAssemblies ( )
inlinevirtual

Adds assemblies to be automatically referenced by loaded scripts.

Reimplemented from IG.Lib.ApplicationCommandlineBase.

References IG.Lib.ScriptLoaderBase.AddDefaultAssemblies().

override void IG.Lib.ShellApplication< InterpreterType >.AplicationMain ( string[]  args)
inlinevirtual

Default main method for the current shell application.

Parameters
argsCommand-line argumets passed when the application is run.

$A Igor xx Nov09 Dec11;

Reimplemented from IG.Lib.ApplicationCommandlineBase.

References IG.Lib.Util.OutputLevel.

override void IG.Lib.ShellApplication< InterpreterType >.TestMain ( string[]  args)
inlinevirtual

Runs the shell interpreter.

Parameters
argsCommandline arguments.

Standard scheme for IGLib-based test applications.

$A Igor Dec12;

Implements IG.Lib.ApplicationCommandlineBase.

References IG.Lib.LoadableScriptBase.DefaultOutputLevel.


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