E-MailRelay
Public Types | Public Member Functions | Public Attributes | List of all members
G::Slot::Binder< T, Args > Struct Template Reference

A functor class template that contains the target object pointer and method pointer, similar to c++20 bind_front(&T::fn,tp). More...

#include <gslot.h>

Public Types

using Mf = void(T::*)(Args...)
 

Public Member Functions

 Binder (T *sink, Mf mf)
 
void operator() (Args... args)
 

Public Attributes

T * m_sink
 
Mf m_mf
 

Detailed Description

template<typename T, typename... Args>
struct G::Slot::Binder< T, Args >

A functor class template that contains the target object pointer and method pointer, similar to c++20 bind_front(&T::fn,tp).

These objects are hidden in the std::function data member of the Slot class so that the Slot is not dependent on the target type. Maybe replace with a lambda.

Definition at line 107 of file gslot.h.

Member Typedef Documentation

◆ Mf

template<typename T , typename... Args>
using G::Slot::Binder< T, Args >::Mf = void (T::*)(Args...)

Definition at line 109 of file gslot.h.

Constructor & Destructor Documentation

◆ Binder()

template<typename T , typename... Args>
G::Slot::Binder< T, Args >::Binder ( T *  sink,
Mf  mf 
)
inline

Definition at line 112 of file gslot.h.

Member Function Documentation

◆ operator()()

template<typename T , typename... Args>
void G::Slot::Binder< T, Args >::operator() ( Args...  args)
inline

Definition at line 117 of file gslot.h.

Member Data Documentation

◆ m_mf

template<typename T , typename... Args>
Mf G::Slot::Binder< T, Args >::m_mf

Definition at line 111 of file gslot.h.

◆ m_sink

template<typename T , typename... Args>
T* G::Slot::Binder< T, Args >::m_sink

Definition at line 110 of file gslot.h.


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