goptions
Loading...
Searching...
No Matches
goptions Namespace Reference

Data Structures

struct  RequiredValue

Variables

constexpr RequiredValue REQUIRED {}
constexpr char HELPFILLSPACE [] = " "
 Padding used when printing option/switch help.
constexpr char GVERSION_STRING [] = "version"
 Reserved option tag used to store version information.
Option parsing exit codes

Process exit codes used by GOptions : and GOption : .

These codes are used in exit(code) calls to allow scripts/tests to distinguish failure modes. They are part of the user-facing contract because they often appear in CI logs and batch workflows.

constexpr int EC__NOOPTIONFOUND = 101
 Option/switch/key not found, or invalid command-line token.
constexpr int EC__DEFINED_OPTION_ALREADY_PRESENT
 Attempted to define an option name more than once.
constexpr int EC__DEFINED_SWITCHALREADYPRESENT
 Attempted to define a switch name more than once.
constexpr int EC__YAML_PARSING_ERROR
 YAML file failed to parse (syntax error or parser failure).
constexpr int EC__MANDATORY_NOT_FILLED = 105
 Mandatory structured option key missing.
constexpr int EC__BAD_CONVERSION = 106
 YAML value could not be converted to requested type.
constexpr int EC_WRONG_VERBOSITY_LEVEL
 Verbosity/debug values outside accepted range (if enforced).

Variable Documentation

◆ EC__BAD_CONVERSION

int goptions::EC__BAD_CONVERSION = 106
inlineconstexpr

Definition at line 73 of file goptionsConventions.h.

◆ EC__DEFINED_OPTION_ALREADY_PRESENT

int goptions::EC__DEFINED_OPTION_ALREADY_PRESENT
inlineconstexpr
Initial value:
=
102

Definition at line 66 of file goptionsConventions.h.

◆ EC__DEFINED_SWITCHALREADYPRESENT

int goptions::EC__DEFINED_SWITCHALREADYPRESENT
inlineconstexpr
Initial value:
=
103

Definition at line 68 of file goptionsConventions.h.

◆ EC__MANDATORY_NOT_FILLED

int goptions::EC__MANDATORY_NOT_FILLED = 105
inlineconstexpr

Definition at line 72 of file goptionsConventions.h.

◆ EC__NOOPTIONFOUND

int goptions::EC__NOOPTIONFOUND = 101
inlineconstexpr

Definition at line 65 of file goptionsConventions.h.

◆ EC__YAML_PARSING_ERROR

int goptions::EC__YAML_PARSING_ERROR
inlineconstexpr
Initial value:
=
104

Definition at line 70 of file goptionsConventions.h.

◆ EC_WRONG_VERBOSITY_LEVEL

int goptions::EC_WRONG_VERBOSITY_LEVEL
inlineconstexpr
Initial value:
=
107

Definition at line 74 of file goptionsConventions.h.

◆ GVERSION_STRING

char goptions::GVERSION_STRING[] = "version"
inlineconstexpr

GOptions : registers this as a structured option so version metadata can be written to the saved YAML. It is not intended to be set by users. The saved YAML contains release metadata to support reproducibility in scripts and batch pipelines.

Definition at line 53 of file goptionsConventions.h.

◆ HELPFILLSPACE

char goptions::HELPFILLSPACE[] = " "
inlineconstexpr

This string controls the width of the left column used by the help output produced by GOptions : and GOption : so the console formatting stays aligned.

Typical usage pattern:

  • Build the left-hand label (e.g. -runno=<value>).
  • Print it in a fixed-width field using this padding.
  • Print the human-readable description after the aligned column.
Note
The formatting routines live in internal implementation methods; documentation avoids cross-referencing private symbols to prevent unresolved references when private extraction is disabled.

Definition at line 43 of file goptionsConventions.h.

◆ REQUIRED

RequiredValue goptions::REQUIRED {}
inlineconstexpr

Definition at line 25 of file goptionsConventions.h.