CPP-AP 2.2.6
Command-line argument parser for C++20
|
Go to the source code of this file.
Functions | |
std::ostream & | ap::operator<< (std::ostream &os, const argument_parser &) noexcept |
ap::action_type::on_flag::type | ap::action::print_config (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 configuration. | |
detail::callable_type< ap::action_type::observe, std::string > | ap::action::check_file_exists () noexcept |
Returns an observe action which checks whether lower_bound file with the given name exists. | |
template<ap::detail::c_arithmetic T> | |
detail::callable_type< ap::action_type::observe, T > | ap::action::gt (const T lower_bound) noexcept |
Returns an observe action which checks if a parsed value is greater than the given bound. | |
template<ap::detail::c_arithmetic T> | |
detail::callable_type< ap::action_type::observe, T > | ap::action::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::detail::c_arithmetic T> | |
detail::callable_type< ap::action_type::observe, T > | ap::action::lt (const T upper_bound) noexcept |
Returns an observe action which checks if a parsed value is less than the given bound. | |
template<ap::detail::c_arithmetic T> | |
detail::callable_type< ap::action_type::observe, T > | ap::action::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::detail::c_arithmetic T, bool LeftInclusive = true, bool RightInclusive = true> | |
detail::callable_type< ap::action_type::observe, T > | ap::action::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_actions.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_actions.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_actions.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_actions.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_actions.hpp.
|
noexcept |
An os << parser
operation is equivalent to a parser.print_config(_verbose, os)
call, where _verbose
is the inner verbosity mode, which can be set with the verbose function.
os | Output stream. |
parser | The argument parser to print. |
Definition at line 468 of file argument_parser.hpp.
|
inlinenoexcept |
Returns an on-flag action which prints the argument parser's configuration.
parser | The argument parser the configuration 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 configuration will be printed. |
Definition at line 28 of file predefined_actions.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_actions.hpp.