Unit PasDoc_OptionParser

Description

Command line option parsing.

To use this unit, create an object of TOptionParser and add options to it, each option descends from TOption. Then, call your object's TOptionParser.ParseOptions method and options are parsed. After parsing, examine your option objects.

Source: source/component/PasDoc_OptionParser.pas (line 31).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TOption Base class for options.
Class TBoolOption Boolean option, "on" if was specified.
Class TValueOption Base class for all options that have values.
Class TIntegerOption Option that accepts additional Integer as a value.
Class TStringOption Option that accepts additional string as a value.
Class TStringOptionList stringlist option
Class TPathListOption pathlist option
Class TSetOption useful for making a choice of things
Class TOptionParser OptionParser — instantiate one of these for commandline parsing

Constants

DefShortOptionChar = '-';
DefLongOptionString = '--';
OptionFileChar = '@';
CfgMacroCfgPath = '$CFG_PATH';
OptionIndent = ' ';
OptionSep = ' ';
ConsoleWidth = 80;

Description

Constants

DefShortOptionChar = '-';

default short option character used

Source: source/component/PasDoc_OptionParser.pas (line 44).

DefLongOptionString = '--';

default long option string used

Source: source/component/PasDoc_OptionParser.pas (line 46).

OptionFileChar = '@';

Marks "include config file" option

Source: source/component/PasDoc_OptionParser.pas (line 48).

CfgMacroCfgPath = '$CFG_PATH';

Special substitution that, if found inside a config file, will be replaced with actual path of the file

Source: source/component/PasDoc_OptionParser.pas (line 51).

OptionIndent = ' ';

Indentation of option's name from the start of console line

Source: source/component/PasDoc_OptionParser.pas (line 53).

OptionSep = ' ';

Separator between option's name and explanation

Source: source/component/PasDoc_OptionParser.pas (line 55).

ConsoleWidth = 80;

Width of console

Source: source/component/PasDoc_OptionParser.pas (line 57).

Author


Generated by PasDoc 0.17.0.snapshot.