Audacity 3.2.0
Public Types | Public Member Functions | List of all members
TypeSwitch::detail::Executor< R, ArgumentTypes, Funs, Args >::Combine< Fs, Wrapped >::CombineOp< BaseClass, NextBase >::Wrapper Struct Reference

#include <TypeSwitch.h>

Public Types

enum  : unsigned { SetUsed = (Next::SetUsed << 1) | 1u }
 Constant used in a compile-time check. More...
 
using Next = typename Wrapped::type
 

Public Member Functions

operator() (BaseClass &object, const Functions &functions, Args &&... args) const
 

Detailed Description

template<typename R, typename ArgumentTypes, typename Funs, typename... Args>
template<typename Fs, typename Wrapped>
template<typename BaseClass, typename NextBase>
struct TypeSwitch::detail::Executor< R, ArgumentTypes, Funs, Args >::Combine< Fs, Wrapped >::CombineOp< BaseClass, NextBase >::Wrapper

Generates operator () that calls a function that accepts a next function

Definition at line 98 of file TypeSwitch.h.

Member Typedef Documentation

◆ Next

template<typename R , typename ArgumentTypes , typename Funs , typename... Args>
template<typename Fs , typename Wrapped >
template<typename BaseClass , typename NextBase >
using TypeSwitch::detail::Executor< R, ArgumentTypes, Funs, Args >::Combine< Fs, Wrapped >::CombineOp< BaseClass, NextBase >::Wrapper::Next = typename Wrapped::type

Definition at line 99 of file TypeSwitch.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename R , typename ArgumentTypes , typename Funs , typename... Args>
template<typename Fs , typename Wrapped >
template<typename BaseClass , typename NextBase >
anonymous enum : unsigned

Constant used in a compile-time check.

Enumerator
SetUsed 

Definition at line 101 of file TypeSwitch.h.

101: unsigned { SetUsed = (Next::SetUsed << 1) | 1u };

Member Function Documentation

◆ operator()()

template<typename R , typename ArgumentTypes , typename Funs , typename... Args>
template<typename Fs , typename Wrapped >
template<typename BaseClass , typename NextBase >
R TypeSwitch::detail::Executor< R, ArgumentTypes, Funs, Args >::Combine< Fs, Wrapped >::CombineOp< BaseClass, NextBase >::Wrapper::operator() ( BaseClass &  object,
const Functions functions,
Args &&...  args 
) const
inline

Call the first function, which may request dispatch to the further functions

Definition at line 105 of file TypeSwitch.h.

107 {
108 // The first function in the tuple is curried!
109 // Its first argument is the call-through and its second
110 // is the object
111 const auto next = [&](){ return
112 Next{}(object, Tuple::ForwardNext(functions),
113 std::forward<Args>(args)...); };
114 return std::get<0>(functions)(next)(
115 object, std::forward<Args>(args)...);
116 }
auto ForwardNext(Tuple &&tuple)
Forwarding of the tail of a tuple.
Definition: Tuple.h:161

References Tuple::ForwardNext().

Here is the call graph for this function:

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