|
Joutsen.ArgumentsParsing v0.3.0+7-gefd96ff
|
A base class that can be used to easily create implementations of DisplayArgument. More...
Public Member Functions | |
| AbstractDisplayArgument (String name, String alternative, DisplayException displayException, String help) | |
| Creates a new instance. | |
| string | Usage (string name=null) |
| Fetches the usage description of this argument. | |
| string | Description (string name=null, string alternative=null) |
| Fetches the description of this argument. | |
| virtual ArgumentLiteralParser | GetParser () |
| Fetchs the literal parser for this argument. | |
| object | SetDefaultValue (object target, string name=null) |
| Sets the default value of the argument to a target object. | |
| virtual ParseResult | Parse (ArgumentsIterator args, object target, string name=null) |
| Parses the relevant argument in the list and modifies the target object with it. | |
Protected Member Functions | |
| virtual bool | MatchesArgument (String argument) |
| Checks if an input value matches the argument's name or alternative name. | |
Protected Attributes | |
| String | help |
| DisplayArgumentParser | parser |
Properties | |
| bool | IsRequired [get] |
| virtual bool | IsFlag [get] |
| Determines if this argument is nearly a flag (name only) or uses values. | |
| string | Name [get] |
| The name that identifies the argument in the input list. | |
| string | Alternative [get] |
| The alternative name that identifies the argument in the input list. | |
Properties inherited from Joutsen.ArgumentsParsing.DisplayArgument | |
Properties inherited from Joutsen.ArgumentsParsing.ArgumentLiteralParser | |
A base class that can be used to easily create implementations of DisplayArgument.
| Joutsen.ArgumentsParsing.AbstractDisplayArgument.AbstractDisplayArgument | ( | String | name, |
| String | alternative, | ||
| DisplayException | displayException, | ||
| String | help | ||
| ) |
Creates a new instance.
| name | the name that identifies the argument in the input list |
| alternative | the alternative name that identifies the argument in the input list |
| help | additional description that will be part of this arguments description |
| string Joutsen.ArgumentsParsing.AbstractDisplayArgument.Description | ( | string | name = null, |
| string | alternative = null |
||
| ) |
Fetches the description of this argument.
| name | for arguments that are identified by their name in the input string, the name to incorporate into the description |
| alternative | for arguments that are identified by their alternative name in the input string, the alternative name to incorporate into the description |
Implements Joutsen.ArgumentsParsing.ParserArgument.
|
virtual |
Fetchs the literal parser for this argument.
Implements Joutsen.ArgumentsParsing.ParserArgument.
|
protectedvirtual |
Checks if an input value matches the argument's name or alternative name.
|
virtual |
Parses the relevant argument in the list and modifies the target object with it.
| args | the list of input strings that need to be parsed |
| target | the receiver of the parsed values |
| name | an optional name of the argument that is being parsed. This is usually only used for arguments that are identified by their name. |
Implements Joutsen.ArgumentsParsing.ArgumentLiteralParser.
| object Joutsen.ArgumentsParsing.AbstractDisplayArgument.SetDefaultValue | ( | object | target, |
| string | name = null |
||
| ) |
Sets the default value of the argument to a target object.
| target | the receiver of the default value |
| name | an optional name of this argument. This is usually only used for arguments that are identified by their name. |
Implements Joutsen.ArgumentsParsing.ArgumentLiteralParser.
Fetches the usage description of this argument.
| name | for arguments that are identified by their name in the input string, the name to incorporate into the description |
Implements Joutsen.ArgumentsParsing.ParserArgument.
|
protected |
|
protected |
|
get |
The alternative name that identifies the argument in the input list.
Implements Joutsen.ArgumentsParsing.DisplayArgument.
Determines if this argument is nearly a flag (name only) or uses values.
Implements Joutsen.ArgumentsParsing.ArgumentLiteralParser.
|
get |
|
get |
The name that identifies the argument in the input list.
Implements Joutsen.ArgumentsParsing.DisplayArgument.