libcommonc++
0.7
|
An implementation of EventHandler that delegates to a method in an object. More...
#include <EventHandler.h++>
Public Member Functions | |
EventHandlerDelegate (T *object, void(T::*func)(E)) | |
Construct a new EventHandlerDelegate for an object. More... | |
void | operator() (E event) |
Function-call operator. More... | |
Protected Member Functions | |
void | invoke (E event) |
Invoke the handler with an event. More... | |
An implementation of EventHandler that delegates to a method in an object.
The object can be thought of as a pointer to an event handler method that can be invoked as if it were a function; it allows an object to declare one or more event-handling methods to be used as callbacks.
|
inline |
Construct a new EventHandlerDelegate for an object.
object | The object. |
func | A member function (method) in the object which will serve as the event handler. |
|
inlineprotectedvirtual |
|
inlineinherited |