VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
tklb::DelegateFactory< T, Parameters > Struct Template Reference

A factory is needed to ba able to convert the void pointer back to the object and call the member function. More...

#include <TDelegate.hpp>

Collaboration diagram for tklb::DelegateFactory< T, Parameters >:

Static Public Member Functions

template<void(T::*)(Parameters...) Func>
static void Call (void *context, Parameters... parameters)
 
template<void(T::*)(Parameters...) Func>
static Delegate< void(Parameters...)> Create (T *context)
 

Detailed Description

template<typename T, typename... Parameters>
struct tklb::DelegateFactory< T, Parameters >

A factory is needed to ba able to convert the void pointer back to the object and call the member function.

Definition at line 42 of file TDelegate.hpp.

Member Function Documentation

◆ Call()

template<typename T , typename... Parameters>
template<void(T::*)(Parameters...) Func>
static void tklb::DelegateFactory< T, Parameters >::Call ( void *  context,
Parameters...  parameters 
)
inlinestatic

Definition at line 44 of file TDelegate.hpp.

44 {
45 (static_cast<T*>(context)->*Func)(parameters...);
46 }

◆ Create()

template<typename T , typename... Parameters>
template<void(T::*)(Parameters...) Func>
static Delegate< void(Parameters...)> tklb::DelegateFactory< T, Parameters >::Create ( T *  context)
inlinestatic

Definition at line 49 of file TDelegate.hpp.

49 {
50 return Delegate<void(Parameters...)>(context, &DelegateFactory::Call<Func>);
51 }

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