GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::cli::CommandLineParserOptions Struct Reference

Configuration options for command line parsing. More...

#include <GREM/core/command_line_interface.hpp>

Public Attributes

StringView shortOptionPrefix = "-"
 Argument prefix that distinguishes short, single-character options from regular arguments.
StringView longOptionPrefix = "--"
 Argument prefix that distinguishes long, multi-character options from regular arguments.
StringView extraArgumentsSeparator {}
 Argument that separates the main arguments of the command from any extra trailing arguments.
bool useImplicitBooleanValues = true
 Don't take explicit values for boolean options whose default values are false, and instead interpret them as being set to true whenever the option is specified.
bool allowShortOptionGrouping = true
 Allow short, single-character boolean options to be grouped into a single argument.
bool allowEqualsValueSyntax = true
 Allow option values to be specified using option=value syntax as a single argument, in addition to the regular option value syntax.
bool enableHelpOption = true
 Throw an error with a help string for the user if the "help" option is supplied.

Detailed Description

Configuration options for command line parsing.

Member Data Documentation

◆ shortOptionPrefix

StringView grem::cli::CommandLineParserOptions::shortOptionPrefix = "-"

Argument prefix that distinguishes short, single-character options from regular arguments.

If empty or equal to longOptionPrefix, short options are disabled.

◆ longOptionPrefix

StringView grem::cli::CommandLineParserOptions::longOptionPrefix = "--"

Argument prefix that distinguishes long, multi-character options from regular arguments.

Must not be empty.

◆ extraArgumentsSeparator

StringView grem::cli::CommandLineParserOptions::extraArgumentsSeparator {}

Argument that separates the main arguments of the command from any extra trailing arguments.

If empty, extra arguments will not be allowed.

◆ useImplicitBooleanValues

bool grem::cli::CommandLineParserOptions::useImplicitBooleanValues = true

Don't take explicit values for boolean options whose default values are false, and instead interpret them as being set to true whenever the option is specified.

Note
Boolean options whose default values are true always require explicit values regardless of this option.

◆ allowShortOptionGrouping

bool grem::cli::CommandLineParserOptions::allowShortOptionGrouping = true

Allow short, single-character boolean options to be grouped into a single argument.

Note
If shortOptionPrefix is empty or equal to longOptionPrefix, or if useImplicitBooleanValues is false, this option has no effect.

◆ allowEqualsValueSyntax

bool grem::cli::CommandLineParserOptions::allowEqualsValueSyntax = true

Allow option values to be specified using option=value syntax as a single argument, in addition to the regular option value syntax.

◆ enableHelpOption

bool grem::cli::CommandLineParserOptions::enableHelpOption = true

Throw an error with a help string for the user if the "help" option is supplied.


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