gtopt_cli.hpp file
Testable command-line front end of the gtopt standalone binary.
standalone/source/main.cpp is a thin wrapper around gtopt_cli_main(). Everything the binary does before handing a MainOptions to gtopt_main() — argument parsing, the informational sub-commands (--help, --version, --solvers, --check-solvers, --list-dialects, --json-schema), config-file merging, logging set-up and the exit-code mapping — lives here so unit tests can drive it with an argument vector and capture the output streams instead of spawning the process.
Exit codes (shared with gtopt_main / classify_error_exit_code): 0 = success (optimal solution, or an informational command) 1 = non-optimal solution, CLI parse error, or a failed info command 2 = input error (missing file, invalid JSON, bad options) 3 = internal error (unexpected exception, solver crash)
Namespaces
- namespace gtopt