eventxx::event< F > Struct Template Reference
[Events]

Generic event object. More...

Inheritance diagram for eventxx::event< F >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 event (int fd, type ev, F &handler) throw ()
 Creates a new event.


Detailed Description

template<typename F>
struct eventxx::event< F >

Generic event object.

This object stores all the information about an event, including a callback functor, which is called when the event is fired. The template parameter must be a functor (callable object or function) that can take 2 parameters: an integer (the file descriptor of the fired event) and an event::type (the type of event being fired). There is a specialized version of this class which takes as the template parameter a C function with the eventxx::ccallback_type signature, just like C libevent API does.

See also:
eventxx::event< ccallback_type >
Examples:

prio-test.cpp, and test-weof.cpp.


Constructor & Destructor Documentation

template<typename F>
eventxx::event< F >::event ( int  fd,
type  ev,
F &  handler 
) throw () [inline]

Creates a new event.

Parameters:
fd File descriptor to monitor for events.
ev Type of events to monitor (see eventxx::type).
handler Callback functor.


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

Generated on Thu Apr 16 21:08:37 2009 for eventxx by  doxygen 1.5.8