mines
Loading...
Searching...
No Matches
cli.cpp File Reference
module mines
#include <cstdint>
#include <exception>
#include <optional>
#include <string>
#include <vector>
Include dependency graph for cli.cpp:

Classes

class  Arguments
 Parsed commandline arguments. More...
class  UnknownOption
 Unknown option argument. More...
class  RepeatedOption
 Option repeated too many times. More...
class  LeftoverPositionalArgument
 Too many positional arguments. More...

Functions

Arguments parse_arguments (const std::vector< std::string > &arguments)
 Parse commandline arguments.

Function Documentation

◆ parse_arguments()

Arguments parse_arguments ( const std::vector< std::string > & arguments)
export

Parse commandline arguments.

Parameters
argumentsArguments passed to the program (argv), as a list of strings.
Returns
Parsed arguments.
Exceptions
UnknownOptionUnknown option argument.
RepeatedOptionOption repeated too many times.
LeftoverPositionalArgumentToo many positional arguments.