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

A slot class template that is parameterised only on the target method's signature (with an implicit void return) and not on the target class. More...

#include <gslot.h>

Public Member Functions

template<typename T >
 Slot (T &sink, void(T::*mf)(Args...))
 
void invoke (Args... args)
 

Public Attributes

std::function< void(Args...)> m_fn
 

Detailed Description

template<typename... Args>
struct G::Slot::Slot< Args >

A slot class template that is parameterised only on the target method's signature (with an implicit void return) and not on the target class.

The implementation uses std::function to hide the type of the target.

Definition at line 129 of file gslot.h.

Constructor & Destructor Documentation

◆ Slot()

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

Definition at line 133 of file gslot.h.

Member Function Documentation

◆ invoke()

template<typename... Args>
void G::Slot::Slot< Args >::invoke ( Args...  args)
inline

Definition at line 137 of file gslot.h.

Member Data Documentation

◆ m_fn

template<typename... Args>
std::function<void(Args...)> G::Slot::Slot< Args >::m_fn

Definition at line 131 of file gslot.h.


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