Joutsen.ArgumentsParsing v0.3.0+1-ga4c84ed
Public Member Functions | Properties | List of all members
Joutsen.ArgumentsParsing.ArgumentReader< ValueType > Interface Template Reference

An interface for classes which extract literals from an input list. More...

Public Member Functions

ArgumentReadResult< ValueType > Read (ArgumentsIterator args, string name, int offset=0)
 Reads literals from the input. More...
 

Properties

Set< String > ArgumentPrefixes [set]
 The prefixes of the arguments used by the parser. More...
 

Detailed Description

An interface for classes which extract literals from an input list.

Since
0.2.0

Member Function Documentation

◆ Read()

ArgumentReadResult< ValueType > Joutsen.ArgumentsParsing.ArgumentReader< ValueType >.Read ( ArgumentsIterator  args,
string  name,
int  offset = 0 
)

Reads literals from the input.

Parameters
argsthe input list of literal values represented by an iterator
namethe name of the argument whose values to read as found in the input
offsetan optional additional offset of literals where to start reading from the input
Returns
the value read from the input and the number of literals used in the process

Implemented in Joutsen.ArgumentsParsing.ChoiceArgumentReader< ValueType >, Joutsen.ArgumentsParsing.FlagArgumentReader< ValueType >, and Joutsen.ArgumentsParsing.ValueArgumentReader< ValueType >.

Property Documentation

◆ ArgumentPrefixes

Set<String> Joutsen.ArgumentsParsing.ArgumentReader< ValueType >.ArgumentPrefixes
set

The prefixes of the arguments used by the parser.

The values are sometimes used to limit the number of values read from the input.

Implemented in Joutsen.ArgumentsParsing.FlagArgumentReader< ValueType >, and Joutsen.ArgumentsParsing.ValueArgumentReader< ValueType >.