|
CPP-AP 3.0.1
Command-line argument parser for C++20
|
Namespaces | |
| namespace | util |
Functions | |
| ap::action_type::on_flag::type | print_help (const argument_parser &parser, const std::optional< int > exit_code=std::nullopt, std::ostream &os=std::cout) noexcept |
| Returns an on-flag action which prints the argument parser's help message. | |
| util::callable_type< ap::action_type::observe, std::string > | check_file_exists () noexcept |
| Returns an observe action which checks whether lower_bound file with the given name exists. | |
| template<ap::util::c_arithmetic T> | |
| util::callable_type< ap::action_type::observe, T > | gt (const T lower_bound) noexcept |
| Returns an observe action which checks if a parsed value is greater than the given bound. | |
| template<ap::util::c_arithmetic T> | |
| util::callable_type< ap::action_type::observe, T > | geq (const T lower_bound) noexcept |
| Returns an observe action which checks if a parsed value is greater than or equal to the given bound. | |
| template<ap::util::c_arithmetic T> | |
| util::callable_type< ap::action_type::observe, T > | lt (const T upper_bound) noexcept |
| Returns an observe action which checks if a parsed value is less than the given bound. | |
| template<ap::util::c_arithmetic T> | |
| util::callable_type< ap::action_type::observe, T > | leq (const T upper_bound) noexcept |
| Returns an observe action which checks if a parsed value is less than or equal to the given bound. | |
| template<ap::util::c_arithmetic T, bool LeftInclusive = true, bool RightInclusive = true> | |
| util::callable_type< ap::action_type::observe, T > | within (const T lower_bound, const T upper_bound) noexcept |
| Returns an observe action which checks if a parsed value falls within the specified interval. | |
|
inlinenoexcept |
Returns an observe action which checks whether lower_bound file with the given name exists.
Definition at line 41 of file predefined.hpp.
|
noexcept |
Returns an observe action which checks if a parsed value is greater than or equal to the given bound.
| T | The arithmetic value type. |
| lower_bound | The inclusive lower bound to validate against. |
Definition at line 73 of file predefined.hpp.
|
noexcept |
Returns an observe action which checks if a parsed value is greater than the given bound.
| T | The arithmetic value type. |
| lower_bound | The exclusive lower bound to validate against. |
Definition at line 58 of file predefined.hpp.
|
noexcept |
Returns an observe action which checks if a parsed value is less than or equal to the given bound.
| T | The arithmetic value type. |
| lower_bound | The inclusive upper bound to validate against. |
Definition at line 103 of file predefined.hpp.
|
noexcept |
Returns an observe action which checks if a parsed value is less than the given bound.
| T | The arithmetic value type. |
| lower_bound | The exclusive upper bound to validate against. |
Definition at line 88 of file predefined.hpp.
|
inlinenoexcept |
Returns an on-flag action which prints the argument parser's help message.
| parser | Argument parser instance the help message of which will be printed. |
| exit_code | The exit code with which std::exit will be called (if not std::nullopt). |
| os | The output stream to which the help message will be printed. |
Definition at line 28 of file predefined.hpp.
|
noexcept |
Returns an observe action which checks if a parsed value falls within the specified interval.
The interval is defined by the given lower and upper bounds, with inclusivity controlled by the template parameters.
| T | The arithmetic value type. |
| LeftInclusive | Whether the lower bound is inclusive ([) or exclusive (() - default: true. |
| RightInclusive | Whether the upper bound is inclusive (]) or exclusive ()) - default: true. |
| lower_bound | The lower bound of the interval. |
| upper_bound | The upper bound of the interval. |
Definition at line 124 of file predefined.hpp.