C++ Library Extensions 2022.12.09
To help learn modern C++ programming
tpf::types::any_visitors< CallbackTypes > Struct Template Reference

#include <tpf_any.hpp>

Inheritance diagram for tpf::types::any_visitors< CallbackTypes >:
[legend]
Collaboration diagram for tpf::types::any_visitors< CallbackTypes >:
[legend]

Public Member Functions

template<typename Type , typename AnyType , typename... ArgTypes>
std::enable_if_t< is_any_v< remove_cv_ref_t< AnyType > >, bool > if_any_type (AnyType &&any, ArgTypes &&... args) const
 returns true if successful, otherwise false More...
 
template<typename Type , typename AnyType , typename... ArgTypes>
std::enable_if_t< is_constrained_any_v< remove_cv_ref_t< AnyType > >, bool > if_any_type (AnyType &&any, ArgTypes &&... args) const
 returns true if successful, otherwise false More...
 
template<typename AnyType , typename... ArgTypes, typename any_type = remove_cv_ref_t<AnyType>, typename = std::enable_if_t<is_constrained_any_v<any_type>>, typename arg_list_t = arg_list_t<typename any_type::element_types_t, type_list_t<remove_cv_ref_t<ArgTypes>...>>>
void apply (AnyType &&any, ArgTypes &&... args) const
 
template<typename Type , typename... Types, typename... ArgTypes, typename AnyType , typename any_type = remove_cv_ref_t<AnyType>, typename = std::enable_if_t<is_any_v<any_type> || is_constrained_any_v<any_type>>, typename arg_list_t = arg_list_t<type_list_t<Type, Types...>, type_list_t<remove_cv_ref_t<ArgTypes>...>>>
void apply (AnyType &&any, ArgTypes &&... args) const
 
template<typename ContainerType , typename... ArgTypes>
void visit (ContainerType &&container, ArgTypes &&... args) const
 
template<typename ContainerType , typename... ArgTypes>
void visit_with_index (ContainerType &&container, ArgTypes &&... args) const
 
template<typename Type , typename ContainerType , typename... ArgTypes>
void visit_if_any_type (ContainerType &&container, ArgTypes &&... args) const
 
template<typename Type , typename ContainerType , typename... ArgTypes>
void visit_if_any_type_with_index (ContainerType &&container, ArgTypes &&... args) const
 

Public Attributes

bool report_unhandled_value = false
 

Detailed Description

template<typename... CallbackTypes>
struct tpf::types::any_visitors< CallbackTypes >

Definition at line 333 of file tpf_any.hpp.

Member Function Documentation

◆ apply() [1/2]

template<typename... CallbackTypes>
template<typename AnyType , typename... ArgTypes, typename any_type , typename , typename arg_list_t >
void tpf::types::any_visitors< CallbackTypes >::apply ( AnyType &&  any,
ArgTypes &&...  args 
) const

Definition at line 552 of file tpf_any.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply() [2/2]

template<typename... CallbackTypes>
template<typename Type , typename... Types, typename... ArgTypes, typename AnyType , typename any_type , typename , typename arg_list_t >
void tpf::types::any_visitors< CallbackTypes >::apply ( AnyType &&  any,
ArgTypes &&...  args 
) const

Definition at line 519 of file tpf_any.hpp.

Here is the call graph for this function:

◆ if_any_type() [1/2]

template<typename... CallbackTypes>
template<typename Type , typename AnyType , typename... ArgTypes>
std::enable_if_t< is_any_v< remove_cv_ref_t< AnyType > >, bool > tpf::types::any_visitors< CallbackTypes >::if_any_type ( AnyType &&  any,
ArgTypes &&...  args 
) const
inline

returns true if successful, otherwise false

Definition at line 344 of file tpf_any.hpp.

◆ if_any_type() [2/2]

template<typename... CallbackTypes>
template<typename Type , typename AnyType , typename... ArgTypes>
std::enable_if_t< is_constrained_any_v< remove_cv_ref_t< AnyType > >, bool > tpf::types::any_visitors< CallbackTypes >::if_any_type ( AnyType &&  any,
ArgTypes &&...  args 
) const
inline

returns true if successful, otherwise false

Definition at line 357 of file tpf_any.hpp.

Here is the call graph for this function:

◆ visit()

template<typename... CallbackTypes>
template<typename ContainerType , typename... ArgTypes>
void tpf::types::any_visitors< CallbackTypes >::visit ( ContainerType &&  container,
ArgTypes &&...  args 
) const
inline

Definition at line 379 of file tpf_any.hpp.

Here is the call graph for this function:

◆ visit_if_any_type()

template<typename... CallbackTypes>
template<typename Type , typename ContainerType , typename... ArgTypes>
void tpf::types::any_visitors< CallbackTypes >::visit_if_any_type ( ContainerType &&  container,
ArgTypes &&...  args 
) const
inline

Definition at line 392 of file tpf_any.hpp.

◆ visit_if_any_type_with_index()

template<typename... CallbackTypes>
template<typename Type , typename ContainerType , typename... ArgTypes>
void tpf::types::any_visitors< CallbackTypes >::visit_if_any_type_with_index ( ContainerType &&  container,
ArgTypes &&...  args 
) const
inline

Definition at line 399 of file tpf_any.hpp.

◆ visit_with_index()

template<typename... CallbackTypes>
template<typename ContainerType , typename... ArgTypes>
void tpf::types::any_visitors< CallbackTypes >::visit_with_index ( ContainerType &&  container,
ArgTypes &&...  args 
) const
inline

Definition at line 385 of file tpf_any.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ report_unhandled_value

template<typename... CallbackTypes>
bool tpf::types::any_visitors< CallbackTypes >::report_unhandled_value = false

Definition at line 337 of file tpf_any.hpp.


The documentation for this struct was generated from the following file: