argagg: argagg::parser Struct Reference

argagg

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
argagg::parser Struct Reference

A list of option definitions used to inform how to parse arguments. More...

`#include <argagg.hpp>`

## Public Member Functions
parser_results | parse (int argc, const char **argv) const
| Parses the provided command line arguments and returns the results as parser_results.
parser_results | parse (int argc, char **argv) const
| Through strict interpretation of pointer casting rules, despite this being a safe operation, C++ doesn't allow implicit casts from char** to const char** so here's an overload that performs a const_cast, which is typically frowned upon but is safe here.

## Public Attributes
std::vector< definition > | definitions
| Vector of the option definitions which inform this parser how to parse the command line arguments.

## Detailed Description

A list of option definitions used to inform how to parse arguments.

Definition at line 636 of file argagg.hpp.

## Member Function Documentation

## ◆ parse() [1/2]

parser_results argagg::parser::parse | ( | int | argc,
|  | char ** | argv ) const
| inline

Through strict interpretation of pointer casting rules, despite this being a safe operation, C++ doesn't allow implicit casts from char** to const char** so here's an overload that performs a const_cast, which is typically frowned upon but is safe here.

Definition at line 1397 of file argagg.hpp.

## ◆ parse() [2/2]

parser_results argagg::parser::parse | ( | int | argc,
|  | const char ** | argv ) const
| inline

Parses the provided command line arguments and returns the results as parser_results.

Note
  This method is not thread-safe and assumes that no modifications are made to the definitions member field during the extent of this method call.

Definition at line 1167 of file argagg.hpp.

## Member Data Documentation

## ◆ definitions

std::vector<definition> argagg::parser::definitions

Vector of the option definitions which inform this parser how to parse the command line arguments.

Definition at line 643 of file argagg.hpp.

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

- /tmp/pkg/src/argagg-0.4.7/include/argagg/argagg.hpp