Argument

the argument type. store the value that command line's arguments input. we can get the inner value after it is initialized.

Constructors

this
this(string flag, string description)
Undocumented in source.

Members

Aliases

Self
alias Self = typeof(this)
Undocumented in source.

Functions

choices
Self choices(T[] values)

set the choices of argument inner type

choices
Self choices(T value, T[] rest)
choicesStr
string choicesStr()

get the choices in string type, start with choices:

cliVal
Self cliVal(string value, string[] rest)

set the value from client shell

configVal
Self configVal()

set the config value as true, which is used for inernal impletation and is not recommended for use in you project

configVal
Self configVal(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
configVal
Self configVal(T value, T[] rest)
Undocumented in source. Be warned that the author may not have intended to support it.
configVal
Self configVal(T[] values)
Undocumented in source. Be warned that the author may not have intended to support it.
defaultVal
Self defaultVal()

set the default value as true

defaultVal
Self defaultVal(T value)

set the default value

defaultVal
Self defaultVal(T value, T[] rest)

set the default value

defaultVal
Self defaultVal(T[] values)

set the default value

defaultValStr
string defaultValStr()

get the default value in string type, start with default:

description
string description()

get the description, and the output starts with description:

description
Self description(string desc)

set the description

get
ArgVariant get()

get the innner value and is recommended to be used after calling this.initialize()

get
T get()

get inner value in the specified type, T usually is among ArgValueSeq

initialize
Self initialize()

initialize the final value. if this.isValid is false, then would throw error

isValid
bool isValid()

test whether the argument is valid so that you can safely get the inner value after the return value is true

rangeOf
Self rangeOf(T min, T max)

set the range of argument inner value when the argument innner value type is int or double

rangeOfStr
string rangeOfStr()

get the range in string type, start with range:

typeStr
string typeStr()

get the type in string type, used for help command and help option start with type:

Properties

attrName
string attrName [@property getter]

get the attribute name with camel-like

isOptional
bool isOptional [@property getter]

test whether the argument are optional

isRequired
bool isRequired [@property getter]

test whether the argument are required

name
string name [@property getter]

get the name

readableArgName
string readableArgName [@property getter]

get the human readable name, start with < representing required argument, [ representing optional argument and ... is variadic argument

Variables

_description
string _description;
Undocumented in source.
_name
string _name;
Undocumented in source.
defaultDescription
string defaultDescription;
Undocumented in source.
required
bool required;
Undocumented in source.
settled
bool settled;
Undocumented in source.
source
Source source;
Undocumented in source.
variadic
bool variadic;
Undocumented in source.

Meta