goptions
Loading...
Searching...
No Matches
goptionsConventions.h File Reference

Conventions, constants, and error codes for the GOptions : / GOption : subsystem. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  goptions::RequiredValue

Namespaces

namespace  goptions

Variables

constexpr RequiredValue goptions::REQUIRED {}
constexpr char goptions::HELPFILLSPACE [] = " "
 Padding used when printing option/switch help.
constexpr char goptions::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 goptions::EC__NOOPTIONFOUND = 101
 Option/switch/key not found, or invalid command-line token.
constexpr int goptions::EC__DEFINED_OPTION_ALREADY_PRESENT
 Attempted to define an option name more than once.
constexpr int goptions::EC__DEFINED_SWITCHALREADYPRESENT
 Attempted to define a switch name more than once.
constexpr int goptions::EC__YAML_PARSING_ERROR
 YAML file failed to parse (syntax error or parser failure).
constexpr int goptions::EC__MANDATORY_NOT_FILLED = 105
 Mandatory structured option key missing.
constexpr int goptions::EC__BAD_CONVERSION = 106
 YAML value could not be converted to requested type.
constexpr int goptions::EC_WRONG_VERBOSITY_LEVEL
 Verbosity/debug values outside accepted range (if enforced).

Detailed Description

This header collects:

  • formatting constants for help output,
  • the reserved option name used to persist version metadata,
  • exit codes used by option parsing and validation,
  • and the goptions::REQUIRED : tag that flags mandatory keys in structured options.
Note
When writing documentation, if you need to mention the Doxygen command literally, use \\ref (double backslash) so it prints as text rather than being parsed.

Definition in file goptionsConventions.h.