| IGLib 1.5 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Properties | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
IG.Lib.CommandLineJobContainer Class Reference

Carries command execution data, results, and other data such as identification number, etc. More...

Inheritance diagram for IG.Lib.CommandLineJobContainer:
[legend]
Collaboration diagram for IG.Lib.CommandLineJobContainer:
[legend]

## Public Member Functions
| CommandLineJobContainer (ICommandLineApplicationInterpreter interpreter, string commandName, string[] commandArguments)
| Constructs a new interpreter command data. More...
| CommandLineJobContainer (ICommandLineApplicationInterpreter interpreter, string[] commandAndArguments)
| Constructs a new interpreter command data. More...
string | CommandLine ()
| Returns the string that represents the command line, where command is followed by eventual arguments separated by spaces. More...
override string | ToString ()
| Returns string representation of the current command container object. More...

## Public Attributes
ICommandLineApplicationInterpreter | Interpreter
| Command-line interpreter that executes the command. More...
string | CommandName
| name of the command to be executed. More...
string[] | CommandArguments
| Arguments to the command. More...
string | CommandResult
| Stores the result of hte command when completed. More...
DateTime | StartTime
| Time when execution of the command has started. More...
DateTime | CompletionTime
| Time when the execution of the command has completed. More...
double | ExecutionTime
| Total execution time of the command, without the overhead generated by scheduling the command for parallel execution. More...

## 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). More...
virtual void | RunCommand ()
| Executes the command that is represented by the current command data, and stores the results. More...

## Static Protected Member Functions
static int | GetNextIdCommandLine ()
| Returns another ID that is unique for objects of the containing class its and derived classes. More...
static CommandLineJobContainer | Run (CommandLineJobContainer input)
| Executes the command that is represented by the current command data, and stores the results. More...

## Properties
static object | LockIdCommandLine`[get]`
| Lock used for acquiring IDs. More...
override int | Id`[get]`
| Unique ID for objects of the currnet and derived classes. More...
Properties inherited from IG.Lib.IIdentifiable
int | Id`[get]`
| Returns unique ID (in the scope of a given type) of the current object. More...
Properties inherited from IG.Lib.ILockable
object | Lock`[get]`

## Private Member Functions
| CommandLineJobContainer ()
| Prevent calling argument-less constructor. More...

## Private Attributes
int | _id = GetNextIdCommandLine()

## Static Private Attributes
static object | _lockIdCommandLine
static int | _nextIdCommandLine = 0

## Detailed Description

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.

## Constructor & Destructor Documentation

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).

Parameters

  interpreter | Interpreter that will execute the command.

IG.Lib.CommandLineJobContainer.CommandLineJobContainer | ( | ICommandLineApplicationInterpreter | interpreter,
|  | string | commandName,
|  | string[] | commandArguments
| ) |  |
| inline

Constructs a new interpreter command data.

Parameters

  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.

Parameters

  interpreter | Interpreter.
  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.

## Member Function Documentation

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.

References IG.Lib.ICommandLineApplicationInterpreter.Run().

Referenced by IG.Lib.CommandLineJobContainer.Run().

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.

Parameters

  input | Input data. Does not have any effect because data is taken from the current object.

Returns
  Resuts. Actually it just returns the current object, since results are stored in this object by the argument-less RunCommand function.

References IG.Lib.CommandLineJobContainer.RunCommand().

string IG.Lib.CommandLineJobContainer.CommandLine | ( |  | ) |
| inline

Returns the string that represents the command line, where command is followed by eventual arguments separated by spaces.

References IG.Lib.UtilStr.GetCommandLine().

override string IG.Lib.CommandLineJobContainer.ToString | ( |  | ) |
| inline

Returns string representation of the current command container object.

Referenced by IG.Lib.CommandLineApplicationInterpreter.PrintParallelCommands().

## Member Data Documentation

object IG.Lib.CommandLineJobContainer._lockIdCommandLine
| static private

int IG.Lib.CommandLineJobContainer._nextIdCommandLine = 0
| static private

int IG.Lib.CommandLineJobContainer._id = GetNextIdCommandLine()
| private

ICommandLineApplicationInterpreter IG.Lib.CommandLineJobContainer.Interpreter

Command-line interpreter that executes the command.

string IG.Lib.CommandLineJobContainer.CommandName

name of the command to be executed.

Referenced by IG.Lib.CommandLineApplicationInterpreter.RunParallelRepeat().

string [] IG.Lib.CommandLineJobContainer.CommandArguments

Arguments to the command.

Referenced by IG.Lib.CommandLineApplicationInterpreter.RunParallelRepeat().

string IG.Lib.CommandLineJobContainer.CommandResult

Stores the result of hte command when completed.

DateTime IG.Lib.CommandLineJobContainer.StartTime

Time when execution of the command has started.

DateTime IG.Lib.CommandLineJobContainer.CompletionTime

Time when the execution of the command has completed.

double IG.Lib.CommandLineJobContainer.ExecutionTime

Total execution time of the command, without the overhead generated by scheduling the command for parallel execution.

## Property Documentation

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.

Referenced by IG.Lib.CommandLineApplicationInterpreter.GetParallelCommandData(), and IG.Lib.CommandLineApplicationInterpreter.RunParallelRepeat().

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

- igbase/interpreters/CommandlineApplicationInterpreter.cs