libcommonc++  0.7
EventHandler< E > Class Template Referenceabstract

A functor for event-handler callbacks. More...

#include <EventHandler.h++>

Inheritance diagram for EventHandler< E >:

Public Member Functions

virtual ~EventHandler ()
 Destructor. More...
 
void operator() (E event)
 Function-call operator. More...
 

Protected Member Functions

virtual void invoke (E event)=0
 Invoke the handler with an event. More...
 

Detailed Description

template<class E>
class ccxx::EventHandler< E >

A functor for event-handler callbacks.

See EventHandlerDelegate for an implementation that delegates to a method in an object.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ ~EventHandler()

virtual ~EventHandler ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ invoke()

virtual void invoke ( event)
protectedpure virtual

Invoke the handler with an event.

Parameters
eventThe event.

Implemented in EventHandlerDelegate< T, E >.

◆ operator()()

void operator() ( event)
inline

Function-call operator.

The method simply delegates to invoke().

Parameters
eventThe event.

The documentation for this class was generated from the following file: