Interface ICommand
Unit
Declaration
type ICommand = interface(IInterface)
Description
Interface representing a command that can be registered in CommandBuilder for later use by the user.
Attributes
- GUID['{AD920381-6441-48B1-B035-19694D0417A2}']
Hierarchy
- IInterface
- ICommand
Overview
Methods
| Public | function GetName: string; |
| Public | procedure SetName(const AValue: string); |
| Public | function GetDescription: string; |
| Public | procedure SetDescription(const AValue: string); |
| Public | function GetCallback: TCommandCallback; |
| Public | procedure SetCallback(AValue: TCommandCallback); |
| Public | function GetConstraints: TCommandConstraints; |
| Public | procedure SetConstraints(const AValue: TCommandConstraints); |
| Public | function GetOption(const AIndex: string): IOption; |
| Public | function GetOptions: TArray<IOption>; |
| Public | function HasOptions: Boolean; |
| Public | function AddOption(const AFlag, AName, ADescription: string; ANotAllowedFlags: TArray<string> = nil; AConstraint: TOptionConstraint = ocNoValue): IOption; |
Properties
| Public | property Name: string read GetName write SetName; |
| Public | property Description: string read GetDescription write SetDescription; |
| Public | property Callback: TCommandCallback read GetCallback write SetCallback; |
| Public | property Constraints: TCommandConstraints read GetConstraints write SetConstraints; |
| Public | property Option[const AIndex: string]: IOption read GetOption; |
| Public | property Options: TArray<IOption> read GetOptions; |
Description
Methods
| Public | function GetName: string; |
|
This item has no description. | |
| Public | procedure SetName(const AValue: string); |
|
This item has no description. | |
| Public | function GetDescription: string; |
|
This item has no description. | |
| Public | procedure SetDescription(const AValue: string); |
|
This item has no description. | |
| Public | function GetCallback: TCommandCallback; |
|
This item has no description. | |
| Public | procedure SetCallback(AValue: TCommandCallback); |
|
This item has no description. | |
| Public | function GetConstraints: TCommandConstraints; |
|
This item has no description. | |
| Public | procedure SetConstraints(const AValue: TCommandConstraints); |
|
This item has no description. | |
| Public | function GetOption(const AIndex: string): IOption; |
|
Retrieves an option given the index provided as a parameter.
Parameters
| |
| Public | function GetOptions: TArray<IOption>; |
|
Function that returns the array of options defined for the command. | |
| Public | function HasOptions: Boolean; |
|
Function that returns true if the command has at least one option configured. | |
| Public | function AddOption(const AFlag, AName, ADescription: string; ANotAllowedFlags: TArray<string> = nil; AConstraint: TOptionConstraint = ocNoValue): IOption; |
|
Creates and adds the option to the command's list of options as given parameters.
Parameters
| |
Properties
| Public | property Name: string read GetName write SetName; |
|
Name of the command that will be used via the command line by the user. | |
| Public | property Description: string read GetDescription write SetDescription; |
|
Description of the command that best describes its purpose. It can be displayed to the user when he requests help information for the application. | |
| Public | property Callback: TCommandCallback read GetCallback write SetCallback; |
|
Procedure that will be invoked by the builder after validation of the arguments provided by the user and the correct match of this command as the requested one. | |
| Public | property Constraints: TCommandConstraints read GetConstraints write SetConstraints; |
|
Command constrains that will be validated against the arguments provided by the user in order to guarantee that the command is being used correctly. | |
| Public | property Option[const AIndex: string]: IOption read GetOption; |
|
Retrieves an option given the index provided as a parameter.
Parameters
| |
| Public | property Options: TArray<IOption> read GetOptions; |
|
Property that returns the array of options defined for the command. | |
Generated by PasDoc 1.0.4.