RSTools 3.1.0
Versatile C++20 utility library
Loading...
Searching...
No Matches
RST::Parser::Nargs Struct Reference

How many values an option or positional takes. More...

#include <RST/parser/Argument.hpp>

Static Public Member Functions

static Nargs exactly (int n)
 
static Nargs atLeast (int n)
 
static Nargs between (int mn, int mx)
 
static Nargs zeroOrMore ()
 
static Nargs oneOrMore ()
 
static Nargs optional ()
 

Public Attributes

int min = 1
 
int max = 1
 -1 means unlimited.
 

Detailed Description

How many values an option or positional takes.

Member Function Documentation

◆ exactly()

static Nargs RST::Parser::Nargs::exactly ( int  n)
inlinestatic

◆ atLeast()

static Nargs RST::Parser::Nargs::atLeast ( int  n)
inlinestatic

◆ between()

static Nargs RST::Parser::Nargs::between ( int  mn,
int  mx 
)
inlinestatic

◆ zeroOrMore()

static Nargs RST::Parser::Nargs::zeroOrMore ( )
inlinestatic

◆ oneOrMore()

static Nargs RST::Parser::Nargs::oneOrMore ( )
inlinestatic
Examples
parser.cpp.

◆ optional()

static Nargs RST::Parser::Nargs::optional ( )
inlinestatic

Member Data Documentation

◆ min

int RST::Parser::Nargs::min = 1

◆ max

int RST::Parser::Nargs::max = 1

-1 means unlimited.


The documentation for this struct was generated from the following file: