Audacity 3.2.0
Public Types | Public Member Functions | List of all members
TypeSwitch::detail::TypeSwitcher< R, ObjectTypes, Functions, Args > Struct Template Reference

#include <TypeSwitch.h>

Public Types

enum  { All = Length_v<Functions> , AllBits = (1u << All) - 1u }
 
using Object = Head_t< ObjectTypes >
 
template<typename Tail >
using Executor_ = Executor_t< R, Tail, Functions, Args... >
 
using Executors = MapList_t< Fn< Executor_ >, ObjectTypes >
 
using Exec = Apply_t< Callable::OverloadSet, Executors >
 

Public Member Functions

template<typename TupleLike >
operator() (Object &object, const TupleLike &functions, Args &&... args) const
 

Detailed Description

template<typename R, typename ObjectTypes, typename Functions, typename... Args>
struct TypeSwitch::detail::TypeSwitcher< R, ObjectTypes, Functions, Args >

Definition at line 222 of file TypeSwitch.h.

Member Typedef Documentation

◆ Exec

template<typename R , typename ObjectTypes , typename Functions , typename... Args>
using TypeSwitch::detail::TypeSwitcher< R, ObjectTypes, Functions, Args >::Exec = Apply_t<Callable::OverloadSet, Executors>

Definition at line 240 of file TypeSwitch.h.

◆ Executor_

template<typename R , typename ObjectTypes , typename Functions , typename... Args>
template<typename Tail >
using TypeSwitch::detail::TypeSwitcher< R, ObjectTypes, Functions, Args >::Executor_ = Executor_t<R, Tail, Functions, Args...>

Definition at line 228 of file TypeSwitch.h.

◆ Executors

template<typename R , typename ObjectTypes , typename Functions , typename... Args>
using TypeSwitch::detail::TypeSwitcher< R, ObjectTypes, Functions, Args >::Executors = MapList_t<Fn<Executor_>, ObjectTypes>

Definition at line 230 of file TypeSwitch.h.

◆ Object

template<typename R , typename ObjectTypes , typename Functions , typename... Args>
using TypeSwitch::detail::TypeSwitcher< R, ObjectTypes, Functions, Args >::Object = Head_t<ObjectTypes>

Definition at line 224 of file TypeSwitch.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename R , typename ObjectTypes , typename Functions , typename... Args>
anonymous enum
Enumerator
All 
AllBits 

Definition at line 233 of file TypeSwitch.h.

233{ All = Length_v<Functions>, AllBits = (1u << All) - 1u };

Member Function Documentation

◆ operator()()

template<typename R , typename ObjectTypes , typename Functions , typename... Args>
template<typename TupleLike >
R TypeSwitch::detail::TypeSwitcher< R, ObjectTypes, Functions, Args >::operator() ( Object object,
const TupleLike &  functions,
Args &&...  args 
) const
inline

Definition at line 241 of file TypeSwitch.h.

243 {
244 // Do dynamic dispatch to one of the Executors
245 return Invoker<R, Exec, ObjectTypes>{}(object,
246 MakeFunctionTuple(std::make_index_sequence<All>{}, functions),
247 std::forward<Args>(args)...);
248 }
auto MakeFunctionTuple(std::index_sequence< Is... >, const TupleLike &functions)
Definition: TypeSwitch.h:211

References TypeSwitch::detail::MakeFunctionTuple().

Here is the call graph for this function:

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