1 #ifndef EVENT_LOOP_CXX_H     2 #define EVENT_LOOP_CXX_H    13 #include "cgul_exception_cxx.h"    65         cgul_exception_t local = NULL;
    68             throw cgul_exception_cxx(local);
    71         s_instance_wrapper.m_obj = instance;
    72         return &s_instance_wrapper;
    87         s_instance_wrapper.m_obj = NULL;
   106         cgul_exception_t local = NULL;
   109             throw cgul_exception_cxx(local);
   137         cgul_exception_t local = NULL;
   140             throw cgul_exception_cxx(local);
   154         cgul_exception_t local = NULL;
   157             throw cgul_exception_cxx(local);
   191         cgul_exception_t local = NULL;
   193             &local, m_obj, signal_number, cb, cb_data);
   195             throw cgul_exception_cxx(local);
   243         event_loop_listener* obj,
   244         void (event_loop_listener::*listener)(
int))
   246         cgul_exception_t local = NULL;
   247         event_loop__add_signal_handler_listener(
   248             &local, m_obj, signal_number, obj, listener);
   250             throw cgul_exception_cxx(local);
   266         cgul_exception_t local = NULL;
   269             throw cgul_exception_cxx(local);
   307         cgul_exception_t local = NULL;
   310             throw cgul_exception_cxx(local);
   365         event_loop_listener* obj,
   366         void (event_loop_listener::*listener)(timeout_t))
   369         cgul_exception_t local = NULL;
   370         rv = event_loop__add_timeout_listener(
   371                  &local, m_obj, period, obj, listener);
   373             throw cgul_exception_cxx(local);
   395         cgul_exception_t local = NULL;
   398             throw cgul_exception_cxx(local);
   429         cgul_exception_t local = NULL;
   432             throw cgul_exception_cxx(local);
   474         event_loop_listener* obj,
   475         void (event_loop_listener::*listener)(
int))
   477         cgul_exception_t local = NULL;
   478         event_loop__add_read_fd_listener(&local, m_obj, fd, obj, listener);
   480             throw cgul_exception_cxx(local);
   494         cgul_exception_t local = NULL;
   497             throw cgul_exception_cxx(local);
   528         cgul_exception_t local = NULL;
   531             throw cgul_exception_cxx(local);
   573         event_loop_listener* obj,
   574         void (event_loop_listener::*listener)(
int))
   576         cgul_exception_t local = NULL;
   577         event_loop__add_write_fd_listener(&local, m_obj, fd, obj, listener);
   579             throw cgul_exception_cxx(local);
   593         cgul_exception_t local = NULL;
   596             throw cgul_exception_cxx(local);
   627         cgul_exception_t local = NULL;
   630             throw cgul_exception_cxx(local);
   672         event_loop_listener* obj,
   673         void (event_loop_listener::*listener)(
int))
   675         cgul_exception_t local = NULL;
   676         event_loop__add_exception_fd_listener(&local, m_obj, fd, obj, listener);
   678             throw cgul_exception_cxx(local);
   692         cgul_exception_t local = NULL;
   695             throw cgul_exception_cxx(local);
   768     class StaticConstructor {
   774     static StaticConstructor s_staticConstructor;
 void(* event_loop__fd_ready_cb_t)(cgul_exception_t *cex, int fd, void *data)
Definition: event_loop.h:57
static event_loop_cxx * get_instance()
Definition: event_loop_cxx.h:61
event_loop__signal_cb_t signal_cb_t
Definition: event_loop_cxx.h:45
virtual void set_obj(event_loop_t rhs)
Definition: event_loop_cxx.h:746
virtual timeout_t add_timeout(double period, event_loop_listener *obj, void(event_loop_listener::*listener)(timeout_t))
Definition: event_loop_cxx.h:363
virtual event_loop_t get_obj() const
Definition: event_loop_cxx.h:705
virtual void start()
Definition: event_loop_cxx.h:135
virtual void add_read_fd(int fd, fd_ready_cb_t cb, void *cb_data)
Definition: event_loop_cxx.h:425
void event_loop__remove_exception_fd(cgul_exception_t *cex, event_loop_t loop, int fd)
event_loop_t event_loop__get_instance(cgul_exception_t *cex)
void * event_loop__timeout_t
Definition: event_loop.h:36
virtual void add_exception_fd(int fd, event_loop_listener *obj, void(event_loop_listener::*listener)(int))
Definition: event_loop_cxx.h:670
virtual void add_signal_handler(int signal_number, signal_cb_t cb, void *cb_data)
Definition: event_loop_cxx.h:187
void event_loop__remove_write_fd(cgul_exception_t *cex, event_loop_t loop, int fd)
C++ bindings for event_loop 
Definition: event_loop_cxx.h:23
virtual void add_signal_handler(int signal_number, event_loop_listener *obj, void(event_loop_listener::*listener)(int))
Definition: event_loop_cxx.h:241
virtual event_loop_t take_obj()
Definition: event_loop_cxx.h:722
void event_loop__stop(cgul_exception_t *cex, event_loop_t loop)
virtual void remove_read_fd(int fd)
Definition: event_loop_cxx.h:492
virtual void stop()
Definition: event_loop_cxx.h:152
virtual void remove_exception_fd(int fd)
Definition: event_loop_cxx.h:690
void event_loop__start(cgul_exception_t *cex, event_loop_t loop)
event_loop__fd_ready_cb_t fd_ready_cb_t
Definition: event_loop_cxx.h:35
void event_loop__remove_read_fd(cgul_exception_t *cex, event_loop_t loop, int fd)
void event_loop__put_instance()
virtual void remove_write_fd(int fd)
Definition: event_loop_cxx.h:591
virtual ~event_loop_cxx()
Definition: event_loop_cxx.h:117
void event_loop__delete(event_loop_t loop)
void(* event_loop__timeout_cb_t)(cgul_exception_t *cex, event_loop__timeout_t timeout, void *data)
Definition: event_loop.h:78
virtual void remove_timeout(timeout_t timeout)
Definition: event_loop_cxx.h:393
typedefCGUL_BEGIN_C struct event_loop * event_loop_t
Definition: event_loop.h:33
event loop implementation 
virtual void remove_signal_handler(int signal_number)
Definition: event_loop_cxx.h:264
static void put_instance()
Definition: event_loop_cxx.h:84
event_loop_cxx()
Definition: event_loop_cxx.h:104
event_loop__timeout_cb_t timeout_cb_t
Definition: event_loop_cxx.h:40
virtual void add_write_fd(int fd, fd_ready_cb_t cb, void *cb_data)
Definition: event_loop_cxx.h:524
void(* event_loop__signal_cb_t)(cgul_exception_t *cex, int signal_number, void *data)
Definition: event_loop.h:98
event_loop__timeout_t event_loop__add_timeout(cgul_exception_t *cex, event_loop_t loop, double period, event_loop__timeout_cb_t cb, void *cb_data)
event_loop_t event_loop__new(cgul_exception_t *cex)
void event_loop__add_write_fd(cgul_exception_t *cex, event_loop_t loop, int fd, event_loop__fd_ready_cb_t cb, void *cb_data)
void event_loop__add_read_fd(cgul_exception_t *cex, event_loop_t loop, int fd, event_loop__fd_ready_cb_t cb, void *cb_data)
void event_loop__remove_timeout(cgul_exception_t *cex, event_loop_t loop, event_loop__timeout_t timeout)
virtual timeout_t add_timeout(double period, timeout_cb_t cb, void *cb_data)
Definition: event_loop_cxx.h:302
virtual void add_write_fd(int fd, event_loop_listener *obj, void(event_loop_listener::*listener)(int))
Definition: event_loop_cxx.h:571
virtual void add_exception_fd(int fd, fd_ready_cb_t cb, void *cb_data)
Definition: event_loop_cxx.h:623
virtual void add_read_fd(int fd, event_loop_listener *obj, void(event_loop_listener::*listener)(int))
Definition: event_loop_cxx.h:472
void event_loop__add_signal_handler(cgul_exception_t *cex, event_loop_t loop, int signal_number, event_loop__signal_cb_t cb, void *cb_data)
void event_loop__add_exception_fd(cgul_exception_t *cex, event_loop_t loop, int fd, event_loop__fd_ready_cb_t cb, void *cb_data)
void event_loop__remove_signal_handler(cgul_exception_t *cex, event_loop_t loop, int signal_number)
event_loop__timeout_t timeout_t
Definition: event_loop_cxx.h:30