Audacity 3.2.0
Classes | Typedefs | Functions | Variables
TypeSwitch::detail Namespace Reference

Classes

struct  Executor
 Metafunction implementing TypeSwitch. More...
 
struct  Invoker
 
struct  TypeSwitcher
 
struct  UsedCases
 

Typedefs

template<typename... Functions>
using FunctionTupleType = std::tuple< const Functions &... >
 
template<typename Functions >
using FunctionTuple = Apply_t< FunctionTupleType, Functions >
 
template<typename R , typename ArgumentTypes , typename Functions , typename... Args>
using Executor_t = typename Executor< R, ArgumentTypes, Functions, Args... >::type
 Synthesize a function appropriate for ArgumentType. More...
 
template<typename TypeList >
using InheritanceCheck = NotAny< Bind2nd< std::is_base_of, Head_t< TypeList > >, Tail_t< TypeList > >
 

Functions

template<size_t... Is, typename TupleLike >
auto MakeFunctionTuple (std::index_sequence< Is... >, const TupleLike &functions)
 

Variables

template<typename TypeList >
constexpr bool RootTypeCheck_v
 

Typedef Documentation

◆ Executor_t

template<typename R , typename ArgumentTypes , typename Functions , typename... Args>
using TypeSwitch::detail::Executor_t = typedef typename Executor<R, ArgumentTypes, Functions, Args...>::type

Synthesize a function appropriate for ArgumentType.

Template Parameters
ArgumentTypesnonempty; more derived types later
Functionsthose applicable to more derived types are earlier

Definition at line 163 of file TypeSwitch.h.

◆ FunctionTuple

template<typename Functions >
using TypeSwitch::detail::FunctionTuple = typedef Apply_t<FunctionTupleType, Functions>

Definition at line 26 of file TypeSwitch.h.

◆ FunctionTupleType

template<typename... Functions>
using TypeSwitch::detail::FunctionTupleType = typedef std::tuple<const Functions &...>

Definition at line 24 of file TypeSwitch.h.

◆ InheritanceCheck

template<typename TypeList >
using TypeSwitch::detail::InheritanceCheck = typedef NotAny<Bind2nd<std::is_base_of, Head_t<TypeList> >, Tail_t<TypeList> >

Definition at line 254 of file TypeSwitch.h.

Function Documentation

◆ MakeFunctionTuple()

template<size_t... Is, typename TupleLike >
auto TypeSwitch::detail::MakeFunctionTuple ( std::index_sequence< Is... >  ,
const TupleLike &  functions 
)

Definition at line 211 of file TypeSwitch.h.

212 {
213 return std::forward_as_tuple(std::get<Is>(functions)...);
214}

Referenced by TypeSwitch::detail::TypeSwitcher< R, ObjectTypes, Functions, Args >::operator()().

Here is the caller graph for this function:

Variable Documentation

◆ RootTypeCheck_v

template<typename TypeList >
constexpr bool TypeSwitch::detail::RootTypeCheck_v
constexpr
Initial value:
=
Every_v<Bind1st<std::is_base_of, Head_t<TypeList>>, Tail_t<TypeList>>
typename Tail< TypeList >::type Tail_t
Definition: TypeList.h:107

Definition at line 251 of file TypeSwitch.h.