eventxx  1.0.1
eventxx Namespace Reference

Namespace for all symbols libevent C++ wrapper defines. More...

Classes

struct  exception
 Base class for all libevent exceptions. More...
 
struct  invalid_event
 Invalid event exception. More...
 
struct  invalid_priority
 Invalid priority exception. More...
 
struct  time
 Time used for timeout values. More...
 
struct  basic_event
 Basic event from which all events derive. More...
 
struct  event
 Generic event object. More...
 
struct  event< ccallback_type >
 This is the specialization of eventxx::event for C-style callbacks. More...
 
struct  timer
 Timer event object. More...
 
struct  timer< ccallback_type >
 This is the specialization of eventxx::timer for C-style callbacks. More...
 
struct  signal
 Signal event object. More...
 
struct  signal< ccallback_type >
 This is the specialization of eventxx::signal for C-style callbacks. More...
 
struct  mem_cb
 Helper functor to use an arbitrary member function as an event handler. More...
 
struct  dispatcher
 Event dispatcher. More...
 

Typedefs

typedef void(* ccallback_type) (int, short, void *)
 C function used as callback in the C API. More...
 
typedef eventxx::event< ccallback_typecevent
 Shortcut to C-style event. More...
 
typedef eventxx::timer< ccallback_typectimer
 Shortcut to C-style timer. More...
 
typedef eventxx::signal< ccallback_typecsignal
 Shortcut to C-style signal handler. More...
 

Enumerations

enum  { DEFAULT_PRIORITY = -1 , ONCE = EVLOOP_ONCE , NONBLOCK = EVLOOP_NONBLOCK }
 Miscellaneous constants. More...
 
enum  type {
  TIMEOUT = EV_TIMEOUT , READ = EV_READ , WRITE = EV_WRITE , SIGNAL = EV_SIGNAL ,
  PERSIST = EV_PERSIST
}
 Type of events. More...
 

Detailed Description

Namespace for all symbols libevent C++ wrapper defines.

Typedef Documentation

◆ ccallback_type

typedef void(* eventxx::ccallback_type) (int, short, void *)

C function used as callback in the C API.

◆ cevent

Shortcut to C-style event.

Examples
test-eof.cpp.

◆ csignal

Shortcut to C-style signal handler.

◆ ctimer

Shortcut to C-style timer.

Examples
test-time.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Miscellaneous constants.

Enumerator
DEFAULT_PRIORITY 

Default priority (the middle value).

ONCE 

Loop just once.

NONBLOCK 

Don't block the event loop.

◆ 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:

@ READ
Read event.
Definition: eventxx:194
@ PERSIST
Not really an event, is an event modifier.
Definition: eventxx:197
Generic event object.
Definition: eventxx:301
Enumerator
TIMEOUT 

Timeout event.

READ 

Read event.

WRITE 

Write event.

SIGNAL 

Signal event.

PERSIST 

Not really an event, is an event modifier.

Examples
wrapped-functor-way.cpp.