|
HikoGUI
A low latency retained GUI
|
#include <TTauri/Foundation/CommandLineParser.hpp>
Public Member Functions | |
| CommandLineParser (std::string synopsis) | |
| void | add (std::string name, datum_type_t type, std::string help, std::function< int(std::string_view)> enum_conversion={}) noexcept |
| Add a configuration option. | |
| bool | has_error () const noexcept |
| check if an error has occured during parsing. | |
| void | print_help () |
| Print help text for the command line arguments. | |
| datum | parse (std::vector< std::string > const &arguments) noexcept |
| Parse the arguments. | |
A parser to parse command line arguments.
|
inlinenoexcept |
Add a configuration option.
| name | Name of the option. Excluding the leading dashes |
| type | Type of the option's argument |
| help | Description text of the option. |
| enum_conversion | A function that converts a string to an integer. |
|
inlinenoexcept |
check if an error has occured during parsing.
|
inlinenoexcept |
Parse the arguments.
The result will be a map of option/value pairs. Special options are:
| arguments | a list of command line arguments, including the exectable name as the first argument. |
|
inline |
Print help text for the command line arguments.
This will also print any error messages that happened during the parsing.