ValueArgument

Undocumented in source.

Constructors

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

Members

Aliases

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

Functions

_checkVal
void _checkVal(U value)
Undocumented in source. Be warned that the author may not have intended to support it.
_checkVal
void _checkVal(U value)
Undocumented in source. Be warned that the author may not have intended to support it.
_checkValSeq
void _checkValSeq(U[] values)
Undocumented in source. Be warned that the author may not have intended to support it.
choices
Self choices(U[] values)
Undocumented in source. Be warned that the author may not have intended to support it.
choices
Self choices(U[] values)
Undocumented in source. Be warned that the author may not have intended to support it.
choicesStr
string choicesStr()
Undocumented in source. Be warned that the author may not have intended to support it.
cliVal
Self cliVal(string value, string[] rest)
Undocumented in source. Be warned that the author may not have intended to support it.
configVal
Self configVal(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
configVal
Self configVal(U value, U[] rest)
Undocumented in source. Be warned that the author may not have intended to support it.
configVal
Self configVal()
Undocumented in source. Be warned that the author may not have intended to support it.
defaultVal
Self defaultVal(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
defaultVal
Self defaultVal(U value, U[] rest)
Undocumented in source. Be warned that the author may not have intended to support it.
defaultVal
Self defaultVal()
Undocumented in source. Be warned that the author may not have intended to support it.
defaultValStr
string defaultValStr()
Undocumented in source. Be warned that the author may not have intended to support it.
initialize
Self initialize()
Undocumented in source. Be warned that the author may not have intended to support it.
rangeOf
Self rangeOf(U min, U max)
Undocumented in source. Be warned that the author may not have intended to support it.
rangeOfStr
string rangeOfStr()
Undocumented in source. Be warned that the author may not have intended to support it.
typeStr
string typeStr()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

get
ArgVariant get [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
get
T get [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isValid
bool isValid [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_max
T _max;
Undocumented in source.
_max
ElementType!T _max;
Undocumented in source.
_min
T _min;
Undocumented in source.
_min
ElementType!T _min;
Undocumented in source.
argChoices
T[] argChoices;
Undocumented in source.
argChoices
T argChoices;
Undocumented in source.
cliArg
Nullable!T cliArg;
Undocumented in source.
configArg
Nullable!T configArg;
Undocumented in source.
defaultArg
Nullable!T defaultArg;
Undocumented in source.
innerData
T innerData;
Undocumented in source.

Inherited Members

From Argument

_description
string _description;
Undocumented in source.
defaultDescription
string defaultDescription;
Undocumented in source.
required
bool required;
Undocumented in source.
variadic
bool variadic;
Undocumented in source.
_name
string _name;
Undocumented in source.
settled
bool settled;
Undocumented in source.
source
Source source;
Undocumented in source.
Self
alias Self = typeof(this)
Undocumented in source.
description
string description()

get the description, and the output starts with description:

description
Self description(string desc)

set the description

name
string name [@property getter]

get the name

attrName
string attrName [@property getter]

get the attribute name with camel-like

isRequired
bool isRequired [@property getter]

test whether the argument are required

isOptional
bool isOptional [@property getter]

test whether the argument are optional

choices
Self choices(T[] values)

set the choices of argument inner type

choices
Self choices(T value, T[] rest)
rangeOf
Self rangeOf(T min, T max)

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

defaultVal
Self defaultVal()

set the default value as true

configVal
Self configVal()

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

isValid
bool isValid()

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

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

set the value from client shell

initialize
Self initialize()

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

get
ArgVariant get()

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

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

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.
get
T get()

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

readableArgName
string readableArgName [@property getter]

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

typeStr
string typeStr()

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

defaultValStr
string defaultValStr()

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

choicesStr
string choicesStr()

get the choices in string type, start with choices:

rangeOfStr
string rangeOfStr()

get the range in string type, start with range:

Meta