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

#include <tpf_types.hpp>

Public Types

using visitors_t = std::tuple< CallbackTypes... >
 

Public Member Functions

 variant_visitors (CallbackTypes... visitors)
 
template<typename Type >
decltype(auto) handle (Type &&item)
 
template<typename ContainerType >
void for_each (ContainerType &&container)
 
template<typename ContainerType >
void for_each_reverse (ContainerType &&container)
 
template<typename ContainerType >
void for_each_iterator (ContainerType &&container)
 
template<typename ContainerType >
void for_each_index (ContainerType &&container)
 
template<typename ContainerType >
void for_each_reverse_iterator (ContainerType &&container)
 
template<typename ContainerType >
void for_each_reverse_index (ContainerType &&container)
 
template<typename VariantType >
std::enable_if_t< is_variant_v< remove_cv_ref_t< VariantType > > > operator() (VariantType &&vt)
 
template<typename PairType >
std::enable_if_t< is_pair_of_variant_v< remove_cv_ref_t< PairType > > > operator() (PairType &&vt)
 

Public Attributes

visitors_t m_visitors
 

Detailed Description

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

Definition at line 7785 of file tpf_types.hpp.

Member Typedef Documentation

◆ visitors_t

template<typename... CallbackTypes>
using tpf::types::variant_visitors< CallbackTypes >::visitors_t = std::tuple<CallbackTypes...>

Definition at line 7787 of file tpf_types.hpp.

Constructor & Destructor Documentation

◆ variant_visitors()

template<typename... CallbackTypes>
tpf::types::variant_visitors< CallbackTypes >::variant_visitors ( CallbackTypes...  visitors)
inline

Definition at line 7791 of file tpf_types.hpp.

Member Function Documentation

◆ for_each()

template<typename... CallbackTypes>
template<typename ContainerType >
void tpf::types::variant_visitors< CallbackTypes >::for_each ( ContainerType &&  container)
inline

Definition at line 7801 of file tpf_types.hpp.

Here is the call graph for this function:

◆ for_each_index()

template<typename... CallbackTypes>
template<typename ContainerType >
void tpf::types::variant_visitors< CallbackTypes >::for_each_index ( ContainerType &&  container)
inline

Definition at line 7838 of file tpf_types.hpp.

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

◆ for_each_iterator()

template<typename... CallbackTypes>
template<typename ContainerType >
void tpf::types::variant_visitors< CallbackTypes >::for_each_iterator ( ContainerType &&  container)
inline

Definition at line 7820 of file tpf_types.hpp.

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

◆ for_each_reverse()

template<typename... CallbackTypes>
template<typename ContainerType >
void tpf::types::variant_visitors< CallbackTypes >::for_each_reverse ( ContainerType &&  container)
inline

Definition at line 7810 of file tpf_types.hpp.

Here is the call graph for this function:

◆ for_each_reverse_index()

template<typename... CallbackTypes>
template<typename ContainerType >
void tpf::types::variant_visitors< CallbackTypes >::for_each_reverse_index ( ContainerType &&  container)
inline

Definition at line 7865 of file tpf_types.hpp.

Here is the call graph for this function:

◆ for_each_reverse_iterator()

template<typename... CallbackTypes>
template<typename ContainerType >
void tpf::types::variant_visitors< CallbackTypes >::for_each_reverse_iterator ( ContainerType &&  container)
inline

Definition at line 7859 of file tpf_types.hpp.

Here is the call graph for this function:

◆ handle()

template<typename... CallbackTypes>
template<typename Type >
decltype(auto) tpf::types::variant_visitors< CallbackTypes >::handle ( Type &&  item)
inline

Definition at line 7795 of file tpf_types.hpp.

Here is the call graph for this function:

◆ operator()() [1/2]

template<typename... CallbackTypes>
template<typename PairType >
std::enable_if_t< is_pair_of_variant_v< remove_cv_ref_t< PairType > > > tpf::types::variant_visitors< CallbackTypes >::operator() ( PairType &&  vt)
inline

Definition at line 7880 of file tpf_types.hpp.

Here is the call graph for this function:

◆ operator()() [2/2]

template<typename... CallbackTypes>
template<typename VariantType >
std::enable_if_t< is_variant_v< remove_cv_ref_t< VariantType > > > tpf::types::variant_visitors< CallbackTypes >::operator() ( VariantType &&  vt)
inline

Definition at line 7873 of file tpf_types.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ m_visitors

template<typename... CallbackTypes>
visitors_t tpf::types::variant_visitors< CallbackTypes >::m_visitors

Definition at line 7789 of file tpf_types.hpp.


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