Unit CastleParameters
Description
Processing command-line parameters and options (TParameters, single instance Parameters).
Uses
Overview
Classes, Interfaces, Objects and Records
Name | Description |
---|---|
Class EInvalidParams |
|
Class EInvalidShortOption |
|
Class EInvalidLongOption |
|
Class EWrongOptionArgument |
|
Class EExcessiveOptionArgument |
|
Class EMissingOptionArgument |
|
Record TOption |
Command-line option specification, for TParameters.Parse. |
Class TParameters |
Storing and processing command-line parameters and options. |
Functions and Procedures
function SeparateArgsToVector3(const v: TSeparateArgs): TVector3; |
function SeparateArgsToVector3Single(const v: TSeparateArgs): TVector3; deprecated 'use SeparateArgsToVector3'; |
function OptionDescription(const Name, Description: string): string; |
Types
TOptionArgument = (...); |
TOptionArguments = set of TOptionArgument; |
TOptionSeparateArgument = oaRequiredSeparateFirst .. oaRequiredSeparateLast; |
TSeparateArgs = array[1..RequiredSeparateLastCount] of string; |
TOptionProc = procedure (OptionNum: Integer; HasArgument: boolean; const Argument: string; const SeparateArgs: TSeparateArgs; Data: Pointer); |
POption = ˆTOption; |
TOption_Array = array [0..MaxInt div SizeOf(TOption) - 1] of TOption; |
POption_Array = ˆTOption_Array; |
Constants
oaRequiredSeparateFirst = oaRequired2Separate; |
oaRequiredSeparateLast = oaRequired9Separate; |
RequiredSeparateFirstCount = 2; |
RequiredSeparateLastCount = RequiredSeparateFirstCount
+ Ord(oaRequiredSeparateLast) - Ord(oaRequiredSeparateFirst); |
OptionArgumentsRequiredSeparate: TOptionArguments =
[oaRequiredSeparateFirst .. oaRequiredSeparateLast]; |
EmptySeparateArgs: TSeparateArgs = ('','','', '','','', '','',''); |
OnlyHelpOptions: array [0..0] of TOption = (
(Short: 'h'; Long: 'help'; Argument: oaNone)
) deprecated 'define this in your application'; |
HelpOptionHelp =
' -h / --help Print this help message and exit.'
deprecated 'use OptionDescription'; |
VersionOptionHelp =
' -v / --version Print the version number and exit.'
deprecated 'use OptionDescription'; |
Variables
Parameters: TParameters; |
Description
Functions and Procedures
function SeparateArgsToVector3(const v: TSeparateArgs): TVector3; |
This item has no description. |
function SeparateArgsToVector3Single(const v: TSeparateArgs): TVector3; deprecated 'use SeparateArgsToVector3'; |
Warning: this symbol is deprecated: use SeparateArgsToVector3 This item has no description. |
function OptionDescription(const Name, Description: string): string; |
Return a multiline command-line option help, containing the option name and description, nicely indented and broken into multiple lines. Existing newlines in Description are correctly accounted for. |
Types
TOptionArgument = (...); |
This item has no description. Values
|
TOptionArguments = set of TOptionArgument; |
This item has no description. |
TOptionSeparateArgument = oaRequiredSeparateFirst .. oaRequiredSeparateLast; |
This item has no description. |
TSeparateArgs = array[1..RequiredSeparateLastCount] of string; |
This item has no description. |
TOptionProc = procedure (OptionNum: Integer; HasArgument: boolean; const Argument: string; const SeparateArgs: TSeparateArgs; Data: Pointer); |
Callback used by TParameters.Parse to notify about new option.
Parameters
|
POption = ˆTOption; |
This item has no description. |
TOption_Array = array [0..MaxInt div SizeOf(TOption) - 1] of TOption; |
This item has no description. |
POption_Array = ˆTOption_Array; |
This item has no description. |
Constants
oaRequiredSeparateFirst = oaRequired2Separate; |
This item has no description. |
oaRequiredSeparateLast = oaRequired9Separate; |
This item has no description. |
RequiredSeparateFirstCount = 2; |
This item has no description. |
RequiredSeparateLastCount = RequiredSeparateFirstCount
+ Ord(oaRequiredSeparateLast) - Ord(oaRequiredSeparateFirst); |
This item has no description. |
OptionArgumentsRequiredSeparate: TOptionArguments =
[oaRequiredSeparateFirst .. oaRequiredSeparateLast]; |
This item has no description. |
EmptySeparateArgs: TSeparateArgs = ('','','', '','','', '','',''); |
This item has no description. |
OnlyHelpOptions: array [0..0] of TOption = (
(Short: 'h'; Long: 'help'; Argument: oaNone)
) deprecated 'define this in your application'; |
Warning: this symbol is deprecated: define this in your application This item has no description. |
HelpOptionHelp =
' -h / --help Print this help message and exit.'
deprecated 'use OptionDescription'; |
Warning: this symbol is deprecated: use OptionDescription This item has no description. |
VersionOptionHelp =
' -v / --version Print the version number and exit.'
deprecated 'use OptionDescription'; |
Warning: this symbol is deprecated: use OptionDescription This item has no description. |
Variables
Parameters: TParameters; |
Command-line parameters. Initialized from standard ParamStr(0) ... ParamStr(ParamCount). Can be later modified, which is good — you can remove handled parameters. You also have all the methods of TCastleStringList class (e.g. you can assign to another TCastleStringList instance). |
Generated by PasDoc 0.16.0-snapshot.