IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Base cls. for application scripts that can also be used on its own. More...
Public Member Functions | |
AppBase () | |
override void | Script_AddCommands (ICommandLineApplicationInterpreter interpreter, SortedList< string, string > helpStrings) |
Adds commands to the internal interpreter. | |
virtual string | AppCustom (string[] arguments) |
Runs one of the custom embedded applications. | |
Public Attributes | |
const string | ConstCustom = "Custom" |
Name of the command for a group of custom applications. | |
const string | ConstHelpCustom = "Custom application group." |
const string | FileTestArguments = "PrintArguments" |
const string | CustomPrintArguments = "PrintArguments" |
Protected Member Functions | |
override void | InitAppFile () |
Initializes commands for file system related utilities (embedded applications). | |
virtual string | FileFunctionTestArguments (string appName, string[] args) |
Executes embedded application that just prints arguments passed to the application to a console. | |
void | AddCustomCommand (string appName, CommandMethod appMethod, string appHelp) |
Adds a new file system - related embedded application's command (added as sub-command of the base command named ConstFile). | |
virtual string | CustomFunctionPrintArguments (string appName, string[] args) |
Executes embedded application - writing to the console information about file events for the specified file or directory. | |
virtual void | InitAppCustom () |
Initializes commands for file system related utilities (embedded applications). | |
virtual string | RunAppCustom (string[] args) |
Runs a file system related utility (embedded application) according to arguments. | |
Protected Attributes | |
List< string > | AppCustomNames = new List<string>() |
List of installed file command names. | |
List< string > | AppCustomHelpStrings = new List<string>() |
List of help strings corresponding to installed file commands. | |
List< CommandMethod > | AppCustomMethods = new List<CommandMethod>() |
List of methods used to perform file commmands. | |
const string | CustomHelpPrintArguments = " arg1 arg2 ... : Prints out the arguments of the command." |
bool | _appCustomCommandsInitialized = false |
Private Attributes | |
const string | FileHelpTestArguments = " arg1 arg2 ... : Prints out the arguments of the command." |
Base cls. for application scripts that can also be used on its own.
The cls.es derived from this cls. are usually used as internal scripts and provide a set of embedded utiliy applications within an application that is based on an command-line interpreter.
Applications will typically extend this cls. by their own specific cls. that is used in its place for providing various embedded utility applications. The base library itself provides the AppBase cls. derived from this cls., which is used because its shorter name. See that cls. for an example how to prepare a derived cls. that will provide as set of embedded applications.
In applications that have the command-line interpreter, embedded applications from this cls. can typically be run in the following way:
AppName Internal IG.Script.AppBase CommandName arg1 arg2 ...
where AppName is the application name, IG.Script.AppBase is the full name of the script cls. that contains embedded applications, CommandName is name of the command thar launches embedded application, and arg1, arg2, etc. are command arguments for the embedded application.
$A Igor xx;
IG::Script::AppBase::AppBase | ( | ) | [inline] |
override void IG::Script::AppBase::Script_AddCommands | ( | ICommandLineApplicationInterpreter | interpreter, |
SortedList< string, string > | helpStrings | ||
) | [inline, virtual] |
Adds commands to the internal interpreter.
Reimplemented from IG::Script::ScriptAppBase.
Reimplemented in IG::Script::AppExtBase.
override void IG::Script::AppBase::InitAppFile | ( | ) | [inline, protected, virtual] |
Initializes commands for file system related utilities (embedded applications).
Reimplemented from IG::Script::ScriptAppBase.
virtual string IG::Script::AppBase::FileFunctionTestArguments | ( | string | appName, |
string[] | args | ||
) | [inline, protected, virtual] |
Executes embedded application that just prints arguments passed to the application to a console.
appName | Name of the embedded application. |
args | Arguments fo the embedded application's command. |
void IG::Script::AppBase::AddCustomCommand | ( | string | appName, |
CommandMethod | appMethod, | ||
string | appHelp | ||
) | [inline, protected] |
Adds a new file system - related embedded application's command (added as sub-command of the base command named ConstFile).
appName | Application name. |
appMethod | Method used to perform the application. |
appHelp | Eventual help string for the application. |
virtual string IG::Script::AppBase::CustomFunctionPrintArguments | ( | string | appName, |
string[] | args | ||
) | [inline, protected, virtual] |
Executes embedded application - writing to the console information about file events for the specified file or directory.
appName | Name of the embedded application. |
args | Arguments fo the embedded application's command. |
virtual void IG::Script::AppBase::InitAppCustom | ( | ) | [inline, protected, virtual] |
Initializes commands for file system related utilities (embedded applications).
virtual string IG::Script::AppBase::RunAppCustom | ( | string[] | args | ) | [inline, protected, virtual] |
Runs a file system related utility (embedded application) according to arguments.
args | Arguments. 0-th argument is the base command name, 1st argument is the embedded application name, and teh rest arguments are arguments that are used by the embedded application. |
virtual string IG::Script::AppBase::AppCustom | ( | string[] | arguments | ) | [inline, virtual] |
Runs one of the custom embedded applications.
arguments | Array containing the base command name, application command name and arguments. |
const string IG::Script::AppBase::ConstCustom = "Custom" |
Name of the command for a group of custom applications.
const string IG::Script::AppBase::ConstHelpCustom = "Custom application group." |
const string IG::Script::AppBase::FileTestArguments = "PrintArguments" |
const string IG::Script::AppBase::FileHelpTestArguments = " arg1 arg2 ... : Prints out the arguments of the command." [private] |
List<string> IG::Script::AppBase::AppCustomNames = new List<string>() [protected] |
List of installed file command names.
List<string> IG::Script::AppBase::AppCustomHelpStrings = new List<string>() [protected] |
List of help strings corresponding to installed file commands.
List<CommandMethod> IG::Script::AppBase::AppCustomMethods = new List<CommandMethod>() [protected] |
List of methods used to perform file commmands.
const string IG::Script::AppBase::CustomPrintArguments = "PrintArguments" |
const string IG::Script::AppBase::CustomHelpPrintArguments = " arg1 arg2 ... : Prints out the arguments of the command." [protected] |
bool IG::Script::AppBase::_appCustomCommandsInitialized = false [protected] |