IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Carries command execution data, results, and other data such as identification number, etc. Used as job container for parallel execution of interpreter commands. More...
Public Member Functions | |
CommandLineJobContainer (ICommandLineApplicationInterpreter interpreter, string commandName, string[] commandArguments) | |
Constructs a new interpreter command data. | |
CommandLineJobContainer (ICommandLineApplicationInterpreter interpreter, string[] commandAndArguments) | |
Constructs a new interpreter command data. | |
string | CommandLine () |
Returns the string that represents the command line, where command is followed by eventual arguments separated by spaces. | |
override string | ToString () |
Returns string representation of the current command container object. | |
Public Attributes | |
ICommandLineApplicationInterpreter | Interpreter |
Command-line interpreter that executes the command. | |
string | CommandName |
name of the command to be executed. | |
string[] | CommandArguments |
Arguments to the command. | |
string | CommandResult |
Stores the result of hte command when completed. | |
DateTime | StartTime |
Time when execution of the command has started. | |
DateTime | CompletionTime |
Time when the execution of the command has completed. | |
double | ExecutionTime |
Total execution time of the command, without the overhead generated by scheduling the command for parallel execution. | |
Protected Member Functions | |
CommandLineJobContainer (ICommandLineApplicationInterpreter interpreter) | |
Argument-less constructor that is called by all other constructors in order to properly initialize the data. It sets the input for parallel job container's execution data simply to the current object (the object being constructed). | |
virtual void | RunCommand () |
Executes the command that is represented by the current command data, and stores the results. | |
Static Protected Member Functions | |
static int | GetNextIdCommandLine () |
Returns another ID that is unique for objects of the containing class its and derived classes. | |
static CommandLineJobContainer | Run (CommandLineJobContainer input) |
Executes the command that is represented by the current command data, and stores the results. This method just calls the argument-less RunCommand method and is used for execution delegate for the parallel job container. | |
Properties | |
static object | LockIdCommandLine [get] |
Lock used for acquiring IDs. | |
override int | Id [get] |
Unique ID for objects of the currnet and derived classes. | |
Private Member Functions | |
CommandLineJobContainer () | |
Prevent calling argument-less constructor. | |
Private Attributes | |
int | _id = GetNextIdCommandLine() |
Static Private Attributes | |
static object | _lockIdCommandLine |
static int | _nextIdCommandLine = 0 |
Carries command execution data, results, and other data such as identification number, etc.
Used as job container for parallel execution of interpreter commands.
Objects of this type contain all data necessary for execution of the specified command by the specified interpreter. Interpreter to execute the command, command name and arguments, and results of the command are all stored on the object. The CommandLineContainer.
IG::Lib::CommandLineJobContainer::CommandLineJobContainer | ( | ) | [inline, private] |
Prevent calling argument-less constructor.
IG::Lib::CommandLineJobContainer::CommandLineJobContainer | ( | ICommandLineApplicationInterpreter | interpreter | ) | [inline, protected] |
Argument-less constructor that is called by all other constructors in order to properly initialize the data. It sets the input for parallel job container's execution data simply to the current object (the object being constructed).
interpreter | Interpreter that will execute the command. |
IG::Lib::CommandLineJobContainer::CommandLineJobContainer | ( | ICommandLineApplicationInterpreter | interpreter, |
string | commandName, | ||
string[] | commandArguments | ||
) | [inline] |
Constructs a new interpreter command data.
interpreter | Interpreter that will execute the command. |
commandName | Name of the command to be executed. |
commandArguments | Arguments to the command. |
IG::Lib::CommandLineJobContainer::CommandLineJobContainer | ( | ICommandLineApplicationInterpreter | interpreter, |
string[] | commandAndArguments | ||
) | [inline] |
Constructs a new interpreter command data.
commandAndArguments | Array containing the command to be executed (first element) and its eventual arguments. |
Must not be null and the first element must not be null.
static int IG::Lib::CommandLineJobContainer::GetNextIdCommandLine | ( | ) | [inline, static, protected] |
Returns another ID that is unique for objects of the containing class its and derived classes.
virtual void IG::Lib::CommandLineJobContainer::RunCommand | ( | ) | [inline, protected, virtual] |
Executes the command that is represented by the current command data, and stores the results.
static CommandLineJobContainer IG::Lib::CommandLineJobContainer::Run | ( | CommandLineJobContainer | input | ) | [inline, static, protected] |
Executes the command that is represented by the current command data, and stores the results. This method just calls the argument-less RunCommand method and is used for execution delegate for the parallel job container.
input | Input data. Does not have any effect because data is taken from the current object. |
string IG::Lib::CommandLineJobContainer::CommandLine | ( | ) | [inline] |
Returns the string that represents the command line, where command is followed by eventual arguments separated by spaces.
override string IG::Lib::CommandLineJobContainer::ToString | ( | ) | [inline] |
Returns string representation of the current command container object.
Reimplemented from IG::Num::ParallelJobContainerGen< InputType, ResultType >.
object IG::Lib::CommandLineJobContainer::_lockIdCommandLine [static, private] |
int IG::Lib::CommandLineJobContainer::_nextIdCommandLine = 0 [static, private] |
int IG::Lib::CommandLineJobContainer::_id = GetNextIdCommandLine() [private] |
Reimplemented from IG::Num::ParallelJobContainerBase.
Command-line interpreter that executes the command.
name of the command to be executed.
Arguments to the command.
Stores the result of hte command when completed.
Time when execution of the command has started.
Time when the execution of the command has completed.
Total execution time of the command, without the overhead generated by scheduling the command for parallel execution.
object IG::Lib::CommandLineJobContainer::LockIdCommandLine [static, get] |
Lock used for acquiring IDs.
override int IG::Lib::CommandLineJobContainer::Id [get] |
Unique ID for objects of the currnet and derived classes.
Implements IG::Lib::IIdentifiable.