CPP-AP 3.0.1
Command-line argument parser for C++20
Loading...
Searching...
No Matches
ap::argument_parser::parsing_state Struct Reference

A collection of values used during the parsing process. More...

Public Member Functions

 parsing_state (argument_parser &parser, const bool parse_known_only=false)
 
void set_parser (argument_parser &parser)
 Update the parser-specific parameters of the state object.
 

Public Attributes

arg_ptr_t curr_arg
 The currently processed argument.
 
arg_ptr_vec_iter_t curr_pos_arg_it
 An iterator pointing to the next positional argument to be processed.
 
const bool parse_known_only
 A flag indicating whether only known arguments should be parsed.
 
std::vector< std::string > unknown_args = {}
 A vector of unknown argument values.
 

Detailed Description

A collection of values used during the parsing process.

Definition at line 916 of file argument_parser.hpp.

Constructor & Destructor Documentation

◆ parsing_state()

ap::argument_parser::parsing_state::parsing_state ( argument_parser parser,
const bool  parse_known_only = false 
)
inline

Definition at line 917 of file argument_parser.hpp.

Member Function Documentation

◆ set_parser()

void ap::argument_parser::parsing_state::set_parser ( argument_parser parser)
inline

Update the parser-specific parameters of the state object.

Parameters
parserThe new parser.
Examples
/home/runner/work/cpp-ap/cpp-ap/include/ap/argument_parser.hpp.

Definition at line 924 of file argument_parser.hpp.

Member Data Documentation

◆ curr_arg

arg_ptr_t ap::argument_parser::parsing_state::curr_arg

The currently processed argument.

Examples
/home/runner/work/cpp-ap/cpp-ap/include/ap/argument_parser.hpp.

Definition at line 929 of file argument_parser.hpp.

◆ curr_pos_arg_it

arg_ptr_vec_iter_t ap::argument_parser::parsing_state::curr_pos_arg_it

An iterator pointing to the next positional argument to be processed.

Examples
/home/runner/work/cpp-ap/cpp-ap/include/ap/argument_parser.hpp.

Definition at line 931 of file argument_parser.hpp.

◆ parse_known_only

const bool ap::argument_parser::parsing_state::parse_known_only

A flag indicating whether only known arguments should be parsed.

Examples
/home/runner/work/cpp-ap/cpp-ap/include/ap/argument_parser.hpp.

Definition at line 933 of file argument_parser.hpp.

◆ unknown_args

std::vector<std::string> ap::argument_parser::parsing_state::unknown_args = {}

A vector of unknown argument values.

Examples
/home/runner/work/cpp-ap/cpp-ap/include/ap/argument_parser.hpp.

Definition at line 934 of file argument_parser.hpp.


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