Audacity 3.2.0
Public Member Functions | List of all members
TypeSwitch::detail::Invoker< R, Exec, ObjectTypes >::Op< ObjectType, Recur > Struct Template Reference

Public Member Functions

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

Detailed Description

template<typename R, typename Exec, typename ObjectTypes>
template<typename ObjectType, typename Recur>
struct TypeSwitch::detail::Invoker< R, Exec, ObjectTypes >::Op< ObjectType, Recur >

Definition at line 183 of file TypeSwitch.h.

Member Function Documentation

◆ operator()()

template<typename R , typename Exec , typename ObjectTypes >
template<typename ObjectType , typename Recur >
template<typename Object , typename Functions , typename... Args>
R TypeSwitch::detail::Invoker< R, Exec, ObjectTypes >::Op< ObjectType, Recur >::operator() ( Object &  object,
const Functions &  functions,
Args &&...  args 
) const
inline

Definition at line 185 of file TypeSwitch.h.

186 {
187 // Dynamic type test of object
188 if (const auto pObject = dynamic_cast<ObjectType*>(&object))
189 // Dispatch to an Executor that knows which of functions applies
190 return Exec{}(*pObject, functions, std::forward<Args>(args)...);
191 else
192 // Recur, with fewer candidate Executors and all of functions
193 return Recur{}(object, functions, std::forward<Args>(args)...);
194 }

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