|
Joutsen.ArgumentsParsing
v0.2.1
|
A reader that processes a single flag value and produces a predetermined value when it finds a match in the input. More...
Public Member Functions | |
| FlagArgumentReader (String name, String alternative, ValueType resultValue) | |
| Creates a new instance of the reader. More... | |
| virtual ArgumentReadResult< ValueType > | Read (ArgumentsIterator args, string name, int offset=0) |
| Trys to match the flag with the providd name or the first literal from the input. More... | |
Protected Member Functions | |
| virtual bool | MatchesArgument (string argument) |
| Checks if a value matches the flags names. More... | |
Properties | |
| String | Name [get] |
| The name of the flag or more precisely the flag that the reader trys to match with the input literal. More... | |
| String | Alternative [get] |
| The alternative to the name of the flag that the reader will try to match with the input literal. More... | |
| Set< String > | ArgumentPrefixes [set] |
Properties inherited from Joutsen.ArgumentsParsing.ArgumentReader< ValueType > | |
| Set< String > | ArgumentPrefixes [set] |
| The prefixes of the arguments used by the parser. More... | |
A reader that processes a single flag value and produces a predetermined value when it finds a match in the input.
| Joutsen.ArgumentsParsing.FlagArgumentReader< ValueType >.FlagArgumentReader | ( | String | name, |
| String | alternative, | ||
| ValueType | resultValue | ||
| ) |
Creates a new instance of the reader.
| name | the name of the flag that the reader trys to match with the input literal |
| alternative | the alternative to the name of the flag that the reader will try to match with the input literal |
| resultValue | the result value the reader will return if the flag was matched |
|
protectedvirtual |
Checks if a value matches the flags names.
|
virtual |
Trys to match the flag with the providd name or the first literal from the input.
| args | the input list of literal values represented by an iterator |
| name | the name of the argument whose values to read as found in the input |
| offset | an optional additional offset of literals where to start reading from the input |
Implements Joutsen.ArgumentsParsing.ArgumentReader< ValueType >.
|
get |
The alternative to the name of the flag that the reader will try to match with the input literal.
|
set |
|
get |
The name of the flag or more precisely the flag that the reader trys to match with the input literal.
1.8.13