|
Joutsen.ArgumentsParsing
v0.2.1
|
A reader that processes a value from the input literals. More...
Public Member Functions | |
| ValueArgumentReader () | |
| Creates a new instance for resulting types which implement the IConvertible interface. More... | |
| ValueArgumentReader (SimpleTypeConverter< string, ValueType > converter) | |
| Creates a new instance using a custom converter to produce the result value. More... | |
| ValueArgumentReader (SimpleTypeConverter< string, ValueType > converter, String startDelimiter, String endDelimiter, String partConnector, bool keepDelimiters) | |
| Creates a new instance using a custom converter for delimited values to produce the result value. More... | |
| virtual ArgumentReadResult< ValueType > | Read (ArgumentsIterator args, string name, int offset=0) |
| Reads literals from the input to create a resulting value. More... | |
Protected Member Functions | |
| virtual ArgumentReadResult< ValueType > | ReadToEndDelimiter (ArgumentsIterator arguments, string name, int offset) |
| Reads multiple literals from the input until the end delimiter is found. More... | |
| virtual ValueType | GetParsedValue (StringBuilder fullArgument, String name) |
| Combines multiple literals into a single result value. More... | |
| virtual ValueType | GetParsedValue (string value, string argumentName) |
| Converts a read value into the target type. More... | |
Protected Attributes | |
| SimpleTypeConverter< string, ValueType > | _converter |
| The converter used to change the read literals into a different type. More... | |
Properties | |
| virtual String | ValueStartDelimiter [get, set] |
| The delimiter that determines the start of a delimited value. More... | |
| virtual String | ValueEndDelimiter [get, set] |
| The delimiter that determines the end of a delimited value. More... | |
| virtual String | ValuePartsConnector [get, set] |
| The value that is added between the different literals read from the input when reading a delimited value. More... | |
| virtual bool | KeepDelimiters [get, set] |
| Determines if the resulting value should contain the delimiters or not. More... | |
| Set< String > | ArgumentPrefixes [set] |
| virtual SimpleTypeConverter< string, ValueType > | TypeConverter [get, set] |
| The converter used to change the read literals into a different type. More... | |
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 value from the input literals.
| Joutsen.ArgumentsParsing.ValueArgumentReader< ValueType >.ValueArgumentReader | ( | ) |
Creates a new instance for resulting types which implement the IConvertible interface.
| Joutsen.ArgumentsParsing.ValueArgumentReader< ValueType >.ValueArgumentReader | ( | SimpleTypeConverter< string, ValueType > | converter | ) |
Creates a new instance using a custom converter to produce the result value.
| Joutsen.ArgumentsParsing.ValueArgumentReader< ValueType >.ValueArgumentReader | ( | SimpleTypeConverter< string, ValueType > | converter, |
| String | startDelimiter, | ||
| String | endDelimiter, | ||
| String | partConnector, | ||
| bool | keepDelimiters | ||
| ) |
Creates a new instance using a custom converter for delimited values to produce the result value.
|
protectedvirtual |
Combines multiple literals into a single result value.
|
protectedvirtual |
Converts a read value into the target type.
|
virtual |
Reads literals from the input to create a resulting value.
| 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 |
| ArgumentParseException | if a value cannot be converted to the ValueType or if a delimited value is not 'closed' correctly |
Implements Joutsen.ArgumentsParsing.ArgumentReader< ValueType >.
Reimplemented in Joutsen.ArgumentsParsing.ChoiceArgumentReader< ValueType >.
|
protectedvirtual |
Reads multiple literals from the input until the end delimiter is found.
|
protected |
The converter used to change the read literals into a different type.
|
set |
|
getset |
Determines if the resulting value should contain the delimiters or not.
|
getset |
The converter used to change the read literals into a different type.
|
getset |
The delimiter that determines the end of a delimited value.
|
getset |
The value that is added between the different literals read from the input when reading a delimited value.
|
getset |
The delimiter that determines the start of a delimited value.
1.8.13