Classes | |
| struct | eventxx::basic_event |
| Basic event from which all events derive. More... | |
| struct | eventxx::event< F > |
| Generic event object. More... | |
| struct | eventxx::event< ccallback_type > |
| This is the specialization of eventxx::event for C-style callbacks. More... | |
| struct | eventxx::timer< F > |
| Timer event object. More... | |
| struct | eventxx::timer< ccallback_type > |
| This is the specialization of eventxx::timer for C-style callbacks. More... | |
| struct | eventxx::signal< F > |
| Signal event object. More... | |
| struct | eventxx::signal< ccallback_type > |
| This is the specialization of eventxx::signal for C-style callbacks. More... | |
| struct | eventxx::mem_cb< O, M > |
| Helper functor to use an arbitrary member function as an event handler. More... | |
Typedefs | |
| typedef void(* | eventxx::ccallback_type )(int, short, void *) |
| C function used as callback in the C API. | |
| typedef eventxx::event < ccallback_type > | eventxx::cevent |
| Shortcut to C-style event. | |
| typedef eventxx::timer < ccallback_type > | eventxx::ctimer |
| Shortcut to C-style timer. | |
| typedef eventxx::signal < ccallback_type > | eventxx::csignal |
| Shortcut to C-style signal handler. | |
Enumerations | |
| enum | eventxx::type { eventxx::TIMEOUT = EV_TIMEOUT, eventxx::READ = EV_READ, eventxx::WRITE = EV_WRITE, eventxx::SIGNAL = EV_SIGNAL, eventxx::PERSIST = EV_PERSIST } |
| Type of events. More... | |
You can use use the same plain functions callbacks (see eventxx::cevent, eventxx::ctimer and eventxx::csignal) like in C or the other kind of more advanced, stateful function objects (see eventxx::event, eventxx::timer and eventxx::signal templates). The former are just typedef'ed specialization of the later.
A member function wrapper functor (eventxx::mem_cb) is also included, so you can use any member function (method) as an event handler.
Please note that C-like function callback take a short as the type of event, while functors (or member functions) use eventxx::type.
All events derive from a plain class (not template) eventxx::basic_event, one of the main utilities of it (besides containing common code ;) is to be used in STL containers.
Please see each class documentation for details and examples.
| typedef void(* eventxx::ccallback_type)(int, short, void *) |
C function used as callback in the C API.
| typedef eventxx::event< ccallback_type > eventxx::cevent |
| typedef eventxx::signal< ccallback_type > eventxx::csignal |
Shortcut to C-style signal handler.
| typedef eventxx::timer< ccallback_type > eventxx::ctimer |
| enum eventxx::type |
Type of events.
There are 4 kind of events: eventxx::TIMEOUT, eventxx::READ, eventxx::WRITE or eventxx::SIGNAL. eventxx::PERSIST is not an event, is an event modifier flag, that tells eventxx that this event should live until dispatcher::del() is called. You can use, for example:
eventxx::event(fd, eventxx::READ | eventxx::PERSIST, ...);
1.5.8