arg_router
1.4.0
C++ command line argument parsing and routing
|
Namespaces | |
common_rules | |
Classes | |
class | validator |
struct | despecialised_unique_in_owner |
struct | policy_unique_from_owner_parent_to_mode_or_root |
struct | parent_index_pair_type |
struct | parent_types |
struct | must_have_policies |
struct | must_not_have_policies |
struct | child_must_have_policy |
struct | child_must_not_have_policy |
struct | policy_parent_must_not_have_policy |
struct | single_anonymous_mode |
struct | at_least_one_of_policies |
struct | node_types_must_be_at_end |
struct | anonymous_mode_must_be_at_end |
struct | list_like_nodes_must_have_fixed_count_if_not_at_end |
struct | must_have_at_least_min_count_of_1_if_required |
Typedefs | |
template<template< typename... > typename T, typename... Conditions> | |
using | rule = std::tuple< boost::mp11::mp_quote< T >, Conditions... > |
template<typename T , typename... Conditions> | |
using | rule_q = std::tuple< T, Conditions... > |
template<typename RuleTuple > | |
using | validator_from_tuple = typename detail::validator_from_tuple_impl< RuleTuple >::type |
Variables | |
constexpr auto | default_validator |
Namespace for types associated with parse tree validation.
using arg_router::policy::validation::rule = typedef std::tuple<boost::mp11::mp_quote<T>, Conditions...> |
Defines a validator rule.
See validator for how it is to be used.
A condition is defined as:
Where T
is the current type from the tree, from the root down to policy level, and Parents
is a pack of ancestors in increasing generation from T
. The last in the pack is always the root unless T
is itself the root, in which case Parents
is empty.
T | A trait-like type that has a static bool member value that evaluates to true if the tested type is a match (e.g. std::is_same ) |
Conditions | A pack of conditions that all must be satisfied for compilation to be successful |
Definition at line 74 of file validator.hpp.
using arg_router::policy::validation::rule_q = typedef std::tuple<T, Conditions...> |
Quoted metafunction rule overload.
This is the only way to use template template params when defining a rule. The resulting type of T should have the form:
T | A quoted metafunction type with a nested template fn that has a static bool member value that evaluates to true if the tested |
Conditions | A pack of conditions that all must be satisfied for compilation to be successful |
Definition at line 96 of file validator.hpp.
using arg_router::policy::validation::validator_from_tuple = typedef typename detail::validator_from_tuple_impl<RuleTuple>::type |
Defines a validator type built from a tuple-like type of rules.
RuleTuple | Tuple of rules |
Definition at line 614 of file validator.hpp.
|
constexpr |
The default validator instance.
Definition at line 617 of file validator.hpp.