Loading...
Searching...
No Matches
argagg::definition Struct Reference

An option definition which essentially represents what an option is. More...

`#include <argagg.hpp>`

## Public Member Functions

bool | wants_no_arguments () const
| Returns true if this option does not want any arguments.
bool | requires_arguments () const
| Returns true if this option requires arguments.

## Public Attributes

const std::string | name
| Name of the option. Option parser results are keyed by this name.
std::vector< std::string > | flags
| List of strings to match that correspond to this option. Should be fully specified with hyphens (e.g. "-v" or "--verbose").
std::string | help
| Help string for this option.
unsigned int | num_args
| Number of arguments this option requires. Must be 0 or 1. All other values have undefined behavior. Okay, the code actually works with positive values in general, but it's unorthodox command line behavior.

## Detailed Description

An option definition which essentially represents what an option is.

Definition at line 488 of file argagg.hpp.

## Member Function Documentation

## requires_arguments()

bool argagg::definition::requires_arguments | ( |  | ) | const

inline

Returns true if this option requires arguments.

Definition at line 922 of file argagg.hpp.

## wants_no_arguments()

bool argagg::definition::wants_no_arguments | ( |  | ) | const

inline

Returns true if this option does not want any arguments.

Definition at line 915 of file argagg.hpp.

## Member Data Documentation

## flags

std::vector<std::string> argagg::definition::flags

List of strings to match that correspond to this option. Should be fully specified with hyphens (e.g. "-v" or "--verbose").

Definition at line 501 of file argagg.hpp.

## help

std::string argagg::definition::help

Help string for this option.

Definition at line 507 of file argagg.hpp.

## name

const std::string argagg::definition::name

Name of the option. Option parser results are keyed by this name.

Definition at line 494 of file argagg.hpp.

## num_args

unsigned int argagg::definition::num_args

Number of arguments this option requires. Must be 0 or 1. All other values have undefined behavior. Okay, the code actually works with positive values in general, but it's unorthodox command line behavior.

Definition at line 515 of file argagg.hpp.

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

- argagg.hpp