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.LoadableScriptBase.Script_CommandAdapter Class Reference

Adapts that converts internal script commands (delegate of type Script_CommandDelegate) to interpreter commands. More...

+ Collaboration diagram for IG.Lib.LoadableScriptBase.Script_CommandAdapter:

Public Member Functions

 Script_CommandAdapter (LoadableScriptBase script, Script_CommandDelegate scriptCommand)
 
string InterpreterCommand (ICommandLineApplicationInterpreter interpreter, string commandName, string[] args)
 Method that is used to execute interpreter command. More...
 

Protected Attributes

LoadableScriptBase _script
 
Script_CommandDelegate _scriptCommand
 

Properties

LoadableScriptBase Script [get, protected set]
 Script object where the command is installed. More...
 
Script_CommandDelegate ScriptCommand [get, protected set]
 Script's internal command that is executed when interpreter command is called. More...
 

Private Member Functions

 Script_CommandAdapter ()
 

Detailed Description

Adapts that converts internal script commands (delegate of type Script_CommandDelegate) to interpreter commands.

This adapter enables definition of script internal commands in a simple form and installation of them on internal interpreter, which requires command delegate of type .

Constructor & Destructor Documentation

IG.Lib.LoadableScriptBase.Script_CommandAdapter.Script_CommandAdapter ( )
inlineprivate
IG.Lib.LoadableScriptBase.Script_CommandAdapter.Script_CommandAdapter ( LoadableScriptBase  script,
Script_CommandDelegate  scriptCommand 
)
inline

Member Function Documentation

string IG.Lib.LoadableScriptBase.Script_CommandAdapter.InterpreterCommand ( ICommandLineApplicationInterpreter  interpreter,
string  commandName,
string[]  args 
)
inline

Method that is used to execute interpreter command.

This method actually runs the script command enclosed in this adapter.

Parameters
interpreterDummy argument, only to match delegate signature.
commandNameName of the command. This will be the same as the 0-th argument.
argsCommand arguments. 0-th arguments will usually be command name.

References IG.Lib.LoadableScriptBase.Script_GetHelpString().

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

Member Data Documentation

LoadableScriptBase IG.Lib.LoadableScriptBase.Script_CommandAdapter._script
protected
Script_CommandDelegate IG.Lib.LoadableScriptBase.Script_CommandAdapter._scriptCommand
protected

Property Documentation

LoadableScriptBase IG.Lib.LoadableScriptBase.Script_CommandAdapter.Script
getprotected set

Script object where the command is installed.

Script_CommandDelegate IG.Lib.LoadableScriptBase.Script_CommandAdapter.ScriptCommand
getprotected set

Script's internal command that is executed when interpreter command is called.


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