12 #ifndef ECL_SIGSLOTS_LITE_SLOT_HPP_ 13 #define ECL_SIGSLOTS_LITE_SLOT_HPP_ 40 template <
typename Data>
43 virtual void execute(Data data) = 0;
51 template <
typename Data,
typename FunctionClass>
55 MemberSlot(
void (FunctionClass::*func)(Data), FunctionClass &instance) :
61 (*
object.*member_function)(data);
64 void (FunctionClass::*member_function)(Data);
74 template <
typename Data>
78 GlobalSlot(
void (*func)(Data)) : global_function(func) {}
81 if ( global_function != NULL ) {
82 (*global_function)(data);
85 void (*global_function)(Data);
109 template <
typename FunctionClass>
113 MemberSlot(
void (FunctionClass::*func)(
void), FunctionClass &instance) :
115 member_function(func)
119 (*
object.*member_function)();
122 void (FunctionClass::*member_function)(void);
138 if ( global_function != NULL ) {
139 (*global_function)();
142 void (*global_function)(void);
GlobalSlot(void(*func)(void))
GlobalSlot(void(*func)(Data))
A slot with member callback function.
virtual void execute(Data data)=0
Parent slot class with the common, publicly exposed interface.
MemberSlot(void(FunctionClass::*func)(void), FunctionClass &instance)
A slot with global/static callback function.
MemberSlot(void(FunctionClass::*func)(Data), FunctionClass &instance)