libsigc++
2.99.6
|
Converts an arbitrary functor to a unified type which is opaque. More...
#include <sigc++/functors/slot.h>
Converts an arbitrary functor to a unified type which is opaque.
sigc::slot itself is a functor or, to be more precise, a closure. It contains a single, arbitrary functor (or closure) that is executed in operator()().
The template arguments determine the function signature of operator()():
For instance, to declare a slot that returns void and takes two parameters of bool and int:
To use, simply assign the desired functor to the slot. If the functor is not compatible with the parameter list defined with the template arguments then compiler errors are triggered. When called, the slot will invoke the functor with minimal copies. block() and unblock() can be used to block the functor's invocation from operator()() temporarily.