S3FC project page S3FC home page

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

s3_event_handler Class Template Reference

Templated ABC that handles an event. More...

#include <s3_event.h>

Inheritance diagram for s3_event_handler:

Inheritance graph
[legend]
List of all members.

Public Types

typedef T_Event event_t
 Type of the event that this handler handles. More...


Public Methods

virtual void operator() (const event_t &event)=0
 Interface to the event handler. More...


Detailed Description

template<typename T_Event>
class s3_event_handler< T_Event >

Templated ABC that handles an event.

It is templated on the type of event that it handles, T_Event. The actual event handling is performed by the function operator()(const T_Event&), which should be implemented in the derived class.

Classes derived from s3_event_handler are functors, as they can be used with function-call semantics, i.e. h(e), where i is an s3_event_handler instance and e is any other type (event type).

See also:
Event notification and handling

Definition at line 82 of file s3_event.h.


Member Typedef Documentation

template<typename T_Event>
typedef T_Event s3_event_handler::event_t
 

Type of the event that this handler handles.

Definition at line 88 of file s3_event.h.


Member Function Documentation

template<typename T_Event>
virtual void s3_event_handler< T_Event >::operator() const event_t   event [pure virtual]
 

Interface to the event handler.

Overload this in a derived class to implement the actual event handler.

Parameters:
event  Event to be handled.


The documentation for this class was generated from the following file:
Send comments to: s3fc@stonethree.com SourceForge Logo