The @mainpage documentation was too intrusive when eventxx were use in
other projects, so it's moved to a new README file. Now eventxx source has
only the reference API documentation, which integrates well in host
projects.
Remove EVENTXX_BASE_FREE_FIX macro from Doxyfile.
Since the default is to use event_base_free() now, there is no need to add a
macro definition to Doxygen to document it (and the macro name was outdated
anyway).
Use event_base_free() by default.
Since libevent 1.3b fixes the bug in event_base_free(), we use it by default.
Now the macro to prevent the use of event_base_free() is called
EVENTXX_NO_EVENT_BASE_FREE and the warning was removed.
Consistence fix about eventxx::type vs. short.
It wasn't very clear when to use short and when to use eventxx::type. Now it's
clear. Everything use eventxx::type excepto C-like callbacks, which expects a
short.
Excuses about not throwing an exception on dispatcher's dispatch() and exit().
Since libevent don't specify very clearly when and what event_dispatch() and
event_exitloop() returns errors, I cannot specify precisely the exceptions to
throw, so the user must manage the error codes returned by itselfs until
libevent gets documented.
Use enums for several flags.
Now the event type symbols are enums (and have scope, so they are part of the
eventxx namespace). Same for the EVLOOP_* symbols, now are eventxx::*.
Fix priorities API.
Priorities were added in the event constructor, but event priority are reseted
by libevent when they are associated with an event_base (event_base_set()), so
it was useless. Now priorities are set in the dispatcher::add() method, so
event_priority_set() y called just after event_base_set() and we can be all
happy and have working priorities.
Rename event namespace to eventxx.
This renaming is for the sake of clarity, so libevent and eventxx don't get
confused (by the compiler, by the documentation tools, by the man page reader,
etc.).
Casting fixes.
When using function pointers (other than the libevent C API style callbacks),
the implicit cast doesn't work, so reinterpret_cast< void* > is used.
C++ wrapper for libevent.
This is a simple, direct, one-header inline C++ wrapper for libevent.
It's designed to be as close to use to libevent without compromising modern
C++ programming techniques and efficiency (since all implementation is
trivial and inline, theoretically, it imposes no overhead at all).