Interface IOption

Unit

Declaration

type IOption = interface(IInterface)

Description

Interface representing an option that can be set as expected for a command.

Attributes
GUID['{C24CC7B9-946E-44AA-BF92-CE89592F0940}']

Hierarchy

Overview

Methods

Public function GetFlag: string;
Public procedure SetFlag(const AValue: string);
Public function GetName: string;
Public procedure SetName(const AValue: string);
Public function GetDescription: string;
Public procedure SetDescription(const AValue: string);
Public procedure SetNotAllowedFlags(const Value: TArray<string>);
Public function GetNotAllowedFlags: TArray<string>;
Public function GetConstraint: TOptionConstraint;
Public procedure SetConstraint(const AValue: TOptionConstraint);
Public function GetValue: string;
Public procedure SetValue(const AValue: string);

Properties

Public property Flag: string read GetFlag write SetFlag;
Public property Name: string read GetName write SetName;
Public property Description: string read GetDescription write SetDescription;
Public property NotAllowedFlags: TArray<string> read GetNotAllowedFlags write SetNotAllowedFlags;
Public property Constraint: TOptionConstraint read GetConstraint write SetConstraint;
Public property Value: string read GetValue write SetValue;

Description

Methods

Public function GetFlag: string;
 
Public procedure SetFlag(const AValue: string);
 
Public function GetName: string;
 
Public procedure SetName(const AValue: string);
 
Public function GetDescription: string;
 
Public procedure SetDescription(const AValue: string);
 
Public procedure SetNotAllowedFlags(const Value: TArray<string>);
 
Public function GetNotAllowedFlags: TArray<string>;
 
Public function GetConstraint: TOptionConstraint;
 
Public procedure SetConstraint(const AValue: TOptionConstraint);
 
Public function GetValue: string;

returns the value of the option provided via parameter, this value should assigned after parse

Public procedure SetValue(const AValue: string);
 

Properties

Public property Flag: string read GetFlag write SetFlag;

Represents the option as a single letter, i.e. a short option

Public property Name: string read GetName write SetName;

Represents the option as a word, that is, a long option, it does not accept spaces, but "-' can be used for compound names.

Public property Description: string read GetDescription write SetDescription;

Description of the option that best defines your objective. It can be displayed to the user when the user requests information through the help command for example.

Public property NotAllowedFlags: TArray<string> read GetNotAllowedFlags write SetNotAllowedFlags;

Array of flags not supported for use in conjunction with this option. Only the short option without the "-" is accepted.

Public property Constraint: TOptionConstraint read GetConstraint write SetConstraint;

Option constrains that will be validated against the options provided by the user in order to guarantee that the command is being used correctly.

Public property Value: string read GetValue write SetValue;

Returns the value of an option after parsing the parameters informed via the command line. The value of an option shoud be passed on right side of an equal sign after the option name or flag.


Generated by PasDoc 0.16.0.