eventxx
1.0.1
|
Generic event object. More...
Public Member Functions | |
event (int fd, type ev, F &handler) throw () | |
Creates a new event. More... | |
Public Member Functions inherited from eventxx::basic_event | |
bool | pending (type ev) const throw () |
Checks if there is an event pending. More... | |
time | timeout () const throw () |
Timeout of the event. More... | |
void | priority (int priority) const throw (invalid_event, invalid_priority) |
Sets the event's priority. More... | |
int | fd () const throw () |
Event's file descriptor. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from eventxx::basic_event | |
basic_event () throw () | |
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.
|
inline |
Creates a new event.
fd | File descriptor to monitor for events. |
ev | Type of events to monitor (see eventxx::type). |
handler | Callback functor. |
References eventxx::basic_event::fd().