eventxx
1.0.1
|
Helper functor to use an arbitrary member function as an event handler. More...
Public Member Functions | |
mem_cb (O &object, M method) throw () | |
Member function callback constructor. More... | |
Helper functor to use an arbitrary member function as an event handler.
With this wrapper, you can use any object method, which accepts the right parameters (int, short) and returns void, as an event handler. This way you don't have to overload the operator() which can be confusing depending on the context.
You can see an usage example in the Examples Section.
|
inline |
Member function callback constructor.
It expects to receive a class as the first parameter (O), and a member function (of that class O) as the second parameter.
When this instance is called with fd and ev as function arguments, object.method(fd, ev) will be called.
object | Object to be used. |
method | Method to be called. |