Joutsen.ArgumentsParsing  v0.2.1
Public Member Functions | Properties | List of all members
Joutsen.ArgumentsParsing.ArgumentsIterator Interface Reference

A list iterator that is aware of arguments and able to look ahead. More...

Public Member Functions

string NextValue (int skip=0)
 Fetches the next value in the list and advances the iteration. More...
 
string Peek (int skip=0)
 Fetches the next value in the list without advancing the iterator. More...
 
string NextArgument ()
 Advances the iterator to the next value in the list and applies preprocessing to the value. More...
 

Properties

bool HasMore [get]
 Checks if the end of the list has been reached or additional values are available. More...
 
Listable< string > RemainingArguments [get]
 The remaining values in the list which the iterator has not advanced to. More...
 
Map< string, ArgumentLiteralParserNamedParsers [set]
 A mapping from arguments identified by their name to their parsers. More...
 
Set< string > ArgumentPrefixes [set]
 All possible prefixes of arguments identified by their names. More...
 

Detailed Description

A list iterator that is aware of arguments and able to look ahead.

Since
0.2.0

Member Function Documentation

◆ NextArgument()

string Joutsen.ArgumentsParsing.ArgumentsIterator.NextArgument ( )

Advances the iterator to the next value in the list and applies preprocessing to the value.

Returns
the next value int he list

Implemented in Joutsen.ArgumentsParsing.Iterators.NormalisingArgumentsListIterator, and Joutsen.ArgumentsParsing.Iterators.SimpleArgumentsListIterator.

◆ NextValue()

string Joutsen.ArgumentsParsing.ArgumentsIterator.NextValue ( int  skip = 0)

Fetches the next value in the list and advances the iteration.

Parameters
skipthe number of arguments to skip when advancing to the next value
Returns
the next value

Implemented in Joutsen.ArgumentsParsing.Iterators.NormalisingArgumentsListIterator, and Joutsen.ArgumentsParsing.Iterators.SimpleArgumentsListIterator.

◆ Peek()

string Joutsen.ArgumentsParsing.ArgumentsIterator.Peek ( int  skip = 0)

Fetches the next value in the list without advancing the iterator.

This offers a look ahead before advancing.

Parameters
skipthe number of arguments to skip when looking ahead to the next value
Returns
the next value

Implemented in Joutsen.ArgumentsParsing.Iterators.NormalisingArgumentsListIterator, and Joutsen.ArgumentsParsing.Iterators.SimpleArgumentsListIterator.

Property Documentation

◆ ArgumentPrefixes

Set<string> Joutsen.ArgumentsParsing.ArgumentsIterator.ArgumentPrefixes
set

All possible prefixes of arguments identified by their names.

◆ HasMore

bool Joutsen.ArgumentsParsing.ArgumentsIterator.HasMore
get

Checks if the end of the list has been reached or additional values are available.

◆ NamedParsers

Map<string, ArgumentLiteralParser> Joutsen.ArgumentsParsing.ArgumentsIterator.NamedParsers
set

A mapping from arguments identified by their name to their parsers.

◆ RemainingArguments

Listable<string> Joutsen.ArgumentsParsing.ArgumentsIterator.RemainingArguments
get

The remaining values in the list which the iterator has not advanced to.

These values are not preprocessed.