arg_router  1.4.0
C++ command line argument parsing and routing
arg_router::traits Namespace Reference

Classes

struct  has_parse_method
 
struct  always_false
 
struct  has_value_type
 
struct  underlying_type
 
struct  is_tuple_like
 
struct  is_specialisation
 
struct  is_specialisation_of
 
struct  is_same_when_despecialised
 
struct  add_optional
 
class  unpack_and_derive
 
struct  supports_static_cast_conversion
 
struct  has_long_name_method
 
struct  has_short_name_method
 
struct  has_display_name_method
 
struct  has_none_name_method
 
struct  has_error_name_method
 
struct  has_description_method
 
struct  has_value_separator_method
 
struct  has_token_end_marker_method
 
struct  has_maximum_count_method
 
struct  has_minimum_count_method
 
struct  has_minimum_value_method
 
struct  has_maximum_value_method
 
struct  has_push_back_method
 
struct  has_help_data_type
 
class  has_runtime_children_method
 
struct  has_generate_help_method
 
struct  has_runtime_generate_help_method
 
struct  has_generate_runtime_help_data_method
 
struct  has_runtime_enabled_method
 
struct  has_translate_exception_method
 
struct  has_error_code_translations_type
 
struct  arg_extractor
 
struct  is_compile_time_string_like
 

Typedefs

template<typename T >
using get_type = typename T::type
 
template<typename T >
using get_value_type = typename T::value_type
 
template<typename T >
using underlying_type_t = typename underlying_type< T >::type
 
template<auto Value>
using integral_constant = std::integral_constant< decltype(Value), Value >
 
template<typename T >
using add_optional_t = typename add_optional< T >::type
 
template<typename T >
using arg_extractor_t = typename arg_extractor< T >::type
 
template<typename T , std::size_t I>
using arg_type_at_index = std::tuple_element_t< I+1, arg_extractor_t< T > >
 

Variables

template<typename... T>
constexpr bool always_false_v = always_false<T...>::value
 
template<typename T >
constexpr bool has_value_type_v = has_value_type<T>::value
 
template<typename T >
constexpr bool is_tuple_like_v = is_tuple_like<T>::value
 
template<typename T >
constexpr bool is_specialisation_v = is_specialisation<T>::value
 
template<typename T , template< typename... > typename U>
constexpr bool is_specialisation_of_v = is_specialisation_of<T, U>::value
 
template<typename T , typename U >
constexpr bool is_same_when_despecialised_v = is_same_when_despecialised<T, U>::value
 
template<typename From , typename To >
constexpr bool supports_static_cast_conversion_v = supports_static_cast_conversion<From, To>::value
 
template<typename T >
constexpr bool has_long_name_method_v = has_long_name_method<T>::value
 
template<typename T >
constexpr bool has_short_name_method_v = has_short_name_method<T>::value
 
template<typename T >
constexpr bool has_display_name_method_v = has_display_name_method<T>::value
 
template<typename T >
constexpr bool has_none_name_method_v = has_none_name_method<T>::value
 
template<typename T >
constexpr bool has_error_name_method_v = has_error_name_method<T>::value
 
template<typename T >
constexpr bool has_description_method_v = has_description_method<T>::value
 
template<typename T >
constexpr bool has_value_separator_method_v = has_value_separator_method<T>::value
 
template<typename T >
constexpr bool has_token_end_marker_method_v = has_token_end_marker_method<T>::value
 
template<typename T >
constexpr bool has_maximum_count_method_v = has_maximum_count_method<T>::value
 
template<typename T >
constexpr bool has_minimum_count_method_v = has_minimum_count_method<T>::value
 
template<typename T >
constexpr bool has_minimum_value_method_v = has_minimum_value_method<T>::value
 
template<typename T >
constexpr bool has_maximum_value_method_v = has_maximum_value_method<T>::value
 
template<typename T >
constexpr bool has_push_back_method_v = has_push_back_method<T>::value
 
template<typename T >
constexpr bool has_help_data_type_v = has_help_data_type<T>::value
 
template<typename T >
constexpr bool has_runtime_children_method_v = has_runtime_children_method<T>::value
 
template<typename T >
constexpr bool has_generate_help_method_v = has_generate_help_method<T>::value
 
template<typename T >
constexpr bool has_runtime_generate_help_method_v = has_runtime_generate_help_method<T>::value
 
template<typename T >
constexpr bool has_generate_runtime_help_data_method_v
 
template<typename T >
constexpr bool has_runtime_enabled_method_v = has_runtime_enabled_method<T>::value
 
template<typename T >
constexpr std::size_t arity_v = std::tuple_size_v<arg_extractor_t<T>> - 1
 
template<typename T >
constexpr bool is_compile_time_string_like_v = is_compile_time_string_like<T>::value
 

Detailed Description

Namespace for type traits.

Typedef Documentation

◆ add_optional_t

template<typename T >
using arg_router::traits::add_optional_t = typedef typename add_optional<T>::type

Helper alias for add_optional.

Template Parameters
TType to wrap

Definition at line 226 of file traits.hpp.

◆ arg_extractor_t

template<typename T >
using arg_router::traits::arg_extractor_t = typedef typename arg_extractor<T>::type

Helper alias for arg_extractor.

Template Parameters
TType to query

Definition at line 747 of file traits.hpp.

◆ arg_type_at_index

template<typename T , std::size_t I>
using arg_router::traits::arg_type_at_index = typedef std::tuple_element_t<I + 1, arg_extractor_t<T> >

Evaluates to the argument type at index I in Callable T.

Template Parameters
TType to query
IArgument index

Definition at line 762 of file traits.hpp.

◆ get_type

template<typename T >
using arg_router::traits::get_type = typedef typename T::type

Alias for typename T::type.

Template Parameters
TType holding the typedef

Definition at line 62 of file traits.hpp.

◆ get_value_type

template<typename T >
using arg_router::traits::get_value_type = typedef typename T::value_type

Alias for typename T::value_type.

Template Parameters
TType holding the typedef

Definition at line 69 of file traits.hpp.

◆ integral_constant

template<auto Value>
using arg_router::traits::integral_constant = typedef std::integral_constant<decltype(Value), Value>

CTAD wraper for std::integral_constant.

Template Parameters
ValuePrimitive value

Definition at line 210 of file traits.hpp.

◆ underlying_type_t

template<typename T >
using arg_router::traits::underlying_type_t = typedef typename underlying_type<T>::type

Helper alias for underlying_type.

Template Parameters
TType to query

Definition at line 106 of file traits.hpp.

Variable Documentation

◆ always_false_v

template<typename... T>
constexpr bool arg_router::traits::always_false_v = always_false<T...>::value
constexpr

Helper variable for always_false.

Template Parameters
T'Sink' type

Definition at line 55 of file traits.hpp.

◆ arity_v

template<typename T >
constexpr std::size_t arg_router::traits::arity_v = std::tuple_size_v<arg_extractor_t<T>> - 1
constexpr

Evaluates to the number of arguments the Callable T has.

Template Parameters
TType to query

Definition at line 754 of file traits.hpp.

◆ has_description_method_v

template<typename T >
constexpr bool arg_router::traits::has_description_method_v = has_description_method<T>::value
constexpr

Helper variable for has_description_method.

Template Parameters
TType to query

Definition at line 401 of file traits.hpp.

◆ has_display_name_method_v

template<typename T >
constexpr bool arg_router::traits::has_display_name_method_v = has_display_name_method<T>::value
constexpr

Helper variable for has_display_name_method.

Template Parameters
TType to query

Definition at line 344 of file traits.hpp.

◆ has_error_name_method_v

template<typename T >
constexpr bool arg_router::traits::has_error_name_method_v = has_error_name_method<T>::value
constexpr

Helper variable for has_error_name_method.

Template Parameters
TType to query

Definition at line 382 of file traits.hpp.

◆ has_generate_help_method_v

template<typename T >
constexpr bool arg_router::traits::has_generate_help_method_v = has_generate_help_method<T>::value
constexpr

Helper variable for has_generate_help_method.

Template Parameters
TType to query

Definition at line 602 of file traits.hpp.

◆ has_generate_runtime_help_data_method_v

template<typename T >
constexpr bool arg_router::traits::has_generate_runtime_help_data_method_v
constexpr
Initial value:
=
has_generate_runtime_help_data_method<T>::value

Helper variable for has_runtime_generate_help_method.

Template Parameters
TType to query

Definition at line 645 of file traits.hpp.

◆ has_help_data_type_v

template<typename T >
constexpr bool arg_router::traits::has_help_data_type_v = has_help_data_type<T>::value
constexpr

Helper variable for has_help_data_type.

Template Parameters
TType to query

Definition at line 553 of file traits.hpp.

◆ has_long_name_method_v

template<typename T >
constexpr bool arg_router::traits::has_long_name_method_v = has_long_name_method<T>::value
constexpr

Helper variable for has_long_name_method.

Template Parameters
TType to query

Definition at line 306 of file traits.hpp.

◆ has_maximum_count_method_v

template<typename T >
constexpr bool arg_router::traits::has_maximum_count_method_v = has_maximum_count_method<T>::value
constexpr

Helper variable for has_maximum_count_method.

Template Parameters
TType to query

Definition at line 458 of file traits.hpp.

◆ has_maximum_value_method_v

template<typename T >
constexpr bool arg_router::traits::has_maximum_value_method_v = has_maximum_value_method<T>::value
constexpr

Helper variable for has_maximum_value_method.

Template Parameters
TType to query

Definition at line 515 of file traits.hpp.

◆ has_minimum_count_method_v

template<typename T >
constexpr bool arg_router::traits::has_minimum_count_method_v = has_minimum_count_method<T>::value
constexpr

Helper variable for has_minimum_count_method.

Template Parameters
TType to query

Definition at line 477 of file traits.hpp.

◆ has_minimum_value_method_v

template<typename T >
constexpr bool arg_router::traits::has_minimum_value_method_v = has_minimum_value_method<T>::value
constexpr

Helper variable for has_minimum_value_method.

Template Parameters
TType to query

Definition at line 496 of file traits.hpp.

◆ has_none_name_method_v

template<typename T >
constexpr bool arg_router::traits::has_none_name_method_v = has_none_name_method<T>::value
constexpr

Helper variable for has_none_name_method.

Template Parameters
TType to query

Definition at line 363 of file traits.hpp.

◆ has_push_back_method_v

template<typename T >
constexpr bool arg_router::traits::has_push_back_method_v = has_push_back_method<T>::value
constexpr

Helper variable for has_push_back_method.

Template Parameters
TType to query

Definition at line 534 of file traits.hpp.

◆ has_runtime_children_method_v

template<typename T >
constexpr bool arg_router::traits::has_runtime_children_method_v = has_runtime_children_method<T>::value
constexpr

Helper variable for has_runtime_children_method.

Template Parameters
TType to query

Definition at line 582 of file traits.hpp.

◆ has_runtime_enabled_method_v

template<typename T >
constexpr bool arg_router::traits::has_runtime_enabled_method_v = has_runtime_enabled_method<T>::value
constexpr

Helper variable for has_runtime_enabled_method.

Template Parameters
TType to query

Definition at line 665 of file traits.hpp.

◆ has_runtime_generate_help_method_v

template<typename T >
constexpr bool arg_router::traits::has_runtime_generate_help_method_v = has_runtime_generate_help_method<T>::value
constexpr

Helper variable for has_runtime_generate_help_method.

Template Parameters
TType to query

Definition at line 624 of file traits.hpp.

◆ has_short_name_method_v

template<typename T >
constexpr bool arg_router::traits::has_short_name_method_v = has_short_name_method<T>::value
constexpr

Helper variable for has_short_name_method.

Template Parameters
TType to query

Definition at line 325 of file traits.hpp.

◆ has_token_end_marker_method_v

template<typename T >
constexpr bool arg_router::traits::has_token_end_marker_method_v = has_token_end_marker_method<T>::value
constexpr

Helper variable for has_token_end_marker_method.

Template Parameters
TType to query

Definition at line 439 of file traits.hpp.

◆ has_value_separator_method_v

template<typename T >
constexpr bool arg_router::traits::has_value_separator_method_v = has_value_separator_method<T>::value
constexpr

Helper variable for has_value_separator_method.

Template Parameters
TType to query

Definition at line 420 of file traits.hpp.

◆ has_value_type_v

template<typename T >
constexpr bool arg_router::traits::has_value_type_v = has_value_type<T>::value
constexpr

Helper variable for has_value_type.

Template Parameters
TType to query

Definition at line 85 of file traits.hpp.

◆ is_compile_time_string_like_v

template<typename T >
constexpr bool arg_router::traits::is_compile_time_string_like_v = is_compile_time_string_like<T>::value
constexpr

Helper variable for is_compile_time_string_like.

Template Parameters
TType to test

Definition at line 553 of file compile_time_string.hpp.

◆ is_same_when_despecialised_v

template<typename T , typename U >
constexpr bool arg_router::traits::is_same_when_despecialised_v = is_same_when_despecialised<T, U>::value
constexpr

Helper variable for is_same_when_despecialised.

Template Parameters
TFirst type to compare
USecond type to compare

Definition at line 203 of file traits.hpp.

◆ is_specialisation_of_v

template<typename T , template< typename... > typename U>
constexpr bool arg_router::traits::is_specialisation_of_v = is_specialisation_of<T, U>::value
constexpr

Helper variable for is_specialisation_of.

Template Parameters
TType to test
UUnspecialised type to test against

Definition at line 175 of file traits.hpp.

◆ is_specialisation_v

template<typename T >
constexpr bool arg_router::traits::is_specialisation_v = is_specialisation<T>::value
constexpr

Helper variable for is_specialisation.

Template Parameters
TType to test

Definition at line 148 of file traits.hpp.

◆ is_tuple_like_v

template<typename T >
constexpr bool arg_router::traits::is_tuple_like_v = is_tuple_like<T>::value
constexpr

Helper variable for is_tuple_like.

Template Parameters
TType to test

Definition at line 127 of file traits.hpp.

◆ supports_static_cast_conversion_v

template<typename From , typename To >
constexpr bool arg_router::traits::supports_static_cast_conversion_v = supports_static_cast_conversion<From, To>::value
constexpr

Helper variable for supports_static_cast_conversion.

Template Parameters
FromType to convert from
ToType to convert to

Definition at line 287 of file traits.hpp.