Class TArgument
Unit
Declaration
type TArgument = class(TInterfacedObject, IArgument)
Description
Class that implements the IArgument interface that represents an argument that can be registered in CommandBuilder for later use by the user.
Hierarchy
- TInterfacedObject
- TArgument
Overview
Methods
class function New(const ADescription: string; AConstraint: TArgumentConstraint): IArgument; |
Properties
property Description: string read GetDescription write SetDescription; |
|
property Constraint: TArgumentConstraint read GetConstraint write SetConstraint; |
|
property Value: string read GetValue write SetValue; |
Description
Methods
class function New(const ADescription: string; AConstraint: TArgumentConstraint): IArgument; |
|
Class factory recommended as first choice for class construction. Allows initialization with initial parameters.
Parameters
|
Properties
property Constraint: TArgumentConstraint read GetConstraint write SetConstraint; |
|
Argument constraints that will be validated against the arguments provided by the user in order to guarantee that the command is being used correctly. |
property Value: string read GetValue write SetValue; |
|
Returns the value of an argument after parsing the parameters informed via the command line. If a given command line parameter has not been classified as a command, it will be assigned to an argument in the order of configuration. A command callback procedure receives a parameter name ABuilder of type TCommandBuilder, using its property Arguments is possible to retrieve an argument that was passed as a parameter by the application's user. Ex: get a filename from parameters: procedure MyCommand(ABuilder: ICommandBuilder); var LFileName: string = ''; begin LFileName := ABuilder.Arguments[0].Value; end;
|
Generated by PasDoc 0.16.0.