|
Joutsen.ArgumentsParsing
v0.2.1
|
A base class that can be used to easily create implementations of ParserArgument. More...
Public Member Functions | |
| virtual string | Description (string name=null, string alternative=null) |
| Fetches the description of this argument. More... | |
| virtual string | Usage (string name=null) |
| Fetches the usage description of this argument. More... | |
| ArgumentLiteralParser | GetParser () |
| Fetchs the literal parser for this argument. More... | |
Protected Member Functions | |
| TargetPropertyArgument (ArgumentReader< ValueType > reader, string name, bool required, ValueType defaultValue, string destination, string help, bool isFlag) | |
| Creates a new instance of the argument. More... | |
Protected Attributes | |
| string | helpText |
| TargetPropertyParser< ValueType > | parser |
Properties | |
| String | Name [get] |
| bool | IsRequired [get] |
A base class that can be used to easily create implementations of ParserArgument.
|
protected |
Creates a new instance of the argument.
| name | the name of the argument |
| required | indicates wether this argument has to appear in the input list or if it is optional |
| defaultValue | the value that wil be set onthe target for this argument if it is not required and did not appear int he input list |
| destiantion | the property name of the target instance which shall recieve the parsed value. If this is null the name will be used instead. |
| help | a help text describing the parameter. It will be used to generade the description of the argument. |
|
virtual |
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.
Reimplemented in Joutsen.ArgumentsParsing.ValueArgument< ValueType >, Joutsen.ArgumentsParsing.CollectionArgument< CollectionType, ValueType >, Joutsen.ArgumentsParsing.FlagArgument< TValueType >, and Joutsen.ArgumentsParsing.ChoiceArgument< ValueType >.
| ArgumentLiteralParser Joutsen.ArgumentsParsing.TargetPropertyArgument< ValueType >.GetParser | ( | ) |
Fetchs the literal parser for this argument.
Implements Joutsen.ArgumentsParsing.ParserArgument.
|
virtual |
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.
Reimplemented in Joutsen.ArgumentsParsing.ValueArgument< ValueType >, Joutsen.ArgumentsParsing.CollectionArgument< CollectionType, ValueType >, and Joutsen.ArgumentsParsing.FlagArgument< TValueType >.
|
protected |
|
protected |
|
get |
|
get |
1.8.13