|
Joutsen.ArgumentsParsing
v0.2.1
|
A literal parser that processes input literals for flag arguments which display output text when found in the input list. More...
Public Member Functions | |
| DisplayArgumentParser (string name, string alternative, DisplayException displayException) | |
| Create a new instance of this parser. More... | |
| virtual ParseResult | Parse (ArgumentsIterator args, object target, string name=null) |
| Parses the relevant argument in the list and modifies the target object with it. More... | |
| object | SetDefaultValue (object target, string name=null) |
| Sets the default value of the argument to a target object. More... | |
| override string | ToString () |
| void | Reset () |
| Clears the parsers state if any in order to prepare it for a new run. More... | |
Properties | |
| bool | IsFlag [get] |
| Identifies this parser as processing flags. More... | |
| string | Name [get] |
| The name of the flag or more precisely the flag that is processed by this parser. More... | |
| string | Alternative [get] |
| The alternative to the name of the flag that will be processed by the parser. More... | |
| ArgumentsListParser | ParentParser [set] |
Properties inherited from Joutsen.ArgumentsParsing.ArgumentLiteralParser | |
| ArgumentsListParser | ParentParser [set] |
| The list parser this literal parser belongs to. More... | |
| bool | IsFlag [get] |
| Determines if this argument is nearly a flag (name only) or uses values. More... | |
A literal parser that processes input literals for flag arguments which display output text when found in the input list.
| Joutsen.ArgumentsParsing.DisplayArgumentParser.DisplayArgumentParser | ( | string | name, |
| string | alternative, | ||
| DisplayException | displayException | ||
| ) |
Create a new instance of this parser.
| name | the flag or name that is processed by the parser |
| alternative | the alternative usually longer version of the flag that is processed by the parser. Optional, can be null. |
| displayException | the exception that is raised if the flag or its alternative is found in the input |
|
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.
| void Joutsen.ArgumentsParsing.DisplayArgumentParser.Reset | ( | ) |
Clears the parsers state if any in order to prepare it for a new run.
Implements Joutsen.ArgumentsParsing.ArgumentLiteralParser.
| object Joutsen.ArgumentsParsing.DisplayArgumentParser.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.
| override string Joutsen.ArgumentsParsing.DisplayArgumentParser.ToString | ( | ) |
|
get |
The alternative to the name of the flag that will be processed by the parser.
This is usually a longer version of the flag that is processed by the parser.
|
get |
Identifies this parser as processing flags.
This property is always true.
|
get |
The name of the flag or more precisely the flag that is processed by this parser.
|
set |
1.8.13