koutil
Loading...
Searching...
No Matches
koutil::args::option_data_t Struct Reference

Holds metadata for an option. More...

#include <option.h>

Public Attributes

std::optional< std::string_view > long_name
 Long form name (without "--").
 
std::optional< char > short_name
 Short form name (without "-").
 
std::string_view description
 Description of the option.
 
std::string_view value_name = "value"
 Name used to represent the option value.
 
bool has_value = false
 True if the option expects a value.
 
bool required = false
 True if the option is mandatory.
 

Detailed Description

Holds metadata for an option.

Describes option names, description, value name, and flags such as whether the option requires a value or is mandatory. The order in which options are added affects their order in the help text, but not their functionality.

Member Data Documentation

◆ description

std::string_view koutil::args::option_data_t::description

Description of the option.

◆ has_value

bool koutil::args::option_data_t::has_value = false

True if the option expects a value.

◆ long_name

std::optional<std::string_view> koutil::args::option_data_t::long_name

Long form name (without "--").

◆ required

bool koutil::args::option_data_t::required = false

True if the option is mandatory.

◆ short_name

std::optional<char> koutil::args::option_data_t::short_name

Short form name (without "-").

◆ value_name

std::string_view koutil::args::option_data_t::value_name = "value"

Name used to represent the option value.


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