template <
typename T_return, typename... T_arg>
class sigc::trackable_signal< T_return(T_arg...)>
trackable_signal can be used to connect() slots that are invoked during subsequent calls to emit().
Any functor or slot can be passed into connect() or connect_first(). It is converted into a slot implicitly.
If you want to connect one signal to another, use make_slot() to retrieve a functor that emits the signal when invoked.
Be careful if you directly pass one signal into the connect() or connect_first() method of another: a shallow copy of the signal is made and the signal's slots are not disconnected until both the signal and its clone are destroyed, which is probably not what you want!
The template arguments determine the function signature of the emit() function:
- T_return The desired return type of the emit() function.
- T_arg Argument types used in the definition of emit().
For instance, to declare a trackable_signal whose connected slot returns void and takes two parameters of bool and int:
decltype(auto) ptr_fun(T_return(*func)(T_args...))
Creates a functor of type sigc::pointer_functor which wraps an existing non-member function.
Definition ptr_fun.h:107
To specify an accumulator type the nested class trackable_signal::accumulated can be used.
- Example:
sigc::trackable_signal<
void(
long)>
sig;
- Since libsigc++ 3.4: