Callback execution policies.
Callback Phases | |
| enum | arg_callback_phase { ARG_CALLBACK_ALWAYS , ARG_CALLBACK_IF_SET , ARG_CALLBACK_IF_UNSET } |
| Execution policy for argument::validate_phase and argument::action_phase. More... | |
Parser Generation | |
| #define | ARG_INVALID(msg) |
| Creates a failing arg_callback value. | |
| #define | ARG_VALID() |
| Creates a successful arg_callback value. | |
Data Structures | |
| struct | arg_callback |
| Result object returned by parser/validator callbacks. More... | |
| #define ARG_INVALID | ( | msg | ) |
Creates a failing arg_callback value.
| msg | Diagnostic message to show the user, e.g. "Must be a positive integer". |
| enum arg_callback_phase |
Execution policy for argument::validate_phase and argument::action_phase.
| Enumerator | |
|---|---|
| ARG_CALLBACK_ALWAYS | Run regardless of user input state. |
| ARG_CALLBACK_IF_SET | Run only when the argument was provided. |
| ARG_CALLBACK_IF_UNSET | Run only when the argument was not provided. |