|
Joutsen.ArgumentsParsing
v0.2.1
|
An interface for different kinds of parsers of string literals. More...
Public Member Functions | |
| ParseResult | Parse (ArgumentsIterator args, object target, string name=null) |
| Parses the relevant argument in the list and modifies the target object with it. More... | |
| void | Reset () |
| Clears the parsers state if any in order to prepare it for a new run. More... | |
| object | SetDefaultValue (object target, string name=null) |
| Sets the default value of the argument to a target object. More... | |
Properties | |
| 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... | |
An interface for different kinds of parsers of string literals.
| ParseResult Joutsen.ArgumentsParsing.ArgumentLiteralParser.Parse | ( | ArgumentsIterator | args, |
| object | target, | ||
| string | name = null |
||
| ) |
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. |
Implemented in Joutsen.ArgumentsParsing.Parsers.DefaultSubParser< TResultType >, Joutsen.ArgumentsParsing.AbstractDisplayArgument, Joutsen.ArgumentsParsing.TargetPropertyParser< ValueType >, Joutsen.ArgumentsParsing.DisplayArgumentParser, and Joutsen.ArgumentsParsing.Parsers.MutuallyExclusiveArgumentsParser.
| void Joutsen.ArgumentsParsing.ArgumentLiteralParser.Reset | ( | ) |
Clears the parsers state if any in order to prepare it for a new run.
Implemented in Joutsen.ArgumentsParsing.TargetPropertyParser< ValueType >, and Joutsen.ArgumentsParsing.DisplayArgumentParser.
| object Joutsen.ArgumentsParsing.ArgumentLiteralParser.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. |
Implemented in Joutsen.ArgumentsParsing.Parsers.DefaultSubParser< TResultType >, Joutsen.ArgumentsParsing.TargetPropertyParser< ValueType >, Joutsen.ArgumentsParsing.AbstractDisplayArgument, Joutsen.ArgumentsParsing.Parsers.MutuallyExclusiveArgumentsParser, and Joutsen.ArgumentsParsing.DisplayArgumentParser.
|
get |
Determines if this argument is nearly a flag (name only) or uses values.
|
set |
The list parser this literal parser belongs to.
1.8.13