… | |
… | |
74 | PREPARE = EV_PREPARE, |
74 | PREPARE = EV_PREPARE, |
75 | FORK = EV_FORK, |
75 | FORK = EV_FORK, |
76 | ASYNC = EV_ASYNC, |
76 | ASYNC = EV_ASYNC, |
77 | EMBED = EV_EMBED, |
77 | EMBED = EV_EMBED, |
78 | # undef ERROR // some systems stupidly #define ERROR |
78 | # undef ERROR // some systems stupidly #define ERROR |
79 | ERROR = EV_ERROR, |
79 | ERROR = EV_ERROR |
80 | }; |
80 | }; |
81 | |
81 | |
82 | enum |
82 | enum |
83 | { |
83 | { |
84 | AUTO = EVFLAG_AUTO, |
84 | AUTO = EVFLAG_AUTO, |
… | |
… | |
225 | void unref () throw () |
225 | void unref () throw () |
226 | { |
226 | { |
227 | ev_unref (EV_AX); |
227 | ev_unref (EV_AX); |
228 | } |
228 | } |
229 | |
229 | |
230 | #if EV_MINIMAL < 2 |
230 | #if EV_FEATURE_API |
231 | unsigned int count () const throw () |
231 | unsigned int iteration () const throw () |
232 | { |
232 | { |
233 | return ev_loop_count (EV_AX); |
233 | return ev_iteration (EV_AX); |
234 | } |
234 | } |
235 | |
235 | |
236 | unsigned int depth () const throw () |
236 | unsigned int depth () const throw () |
237 | { |
237 | { |
238 | return ev_loop_depth (EV_AX); |
238 | return ev_depth (EV_AX); |
239 | } |
239 | } |
240 | |
240 | |
241 | void set_io_collect_interval (tstamp interval) throw () |
241 | void set_io_collect_interval (tstamp interval) throw () |
242 | { |
242 | { |
243 | ev_set_io_collect_interval (EV_AX_ interval); |
243 | ev_set_io_collect_interval (EV_AX_ interval); |
… | |
… | |
413 | struct base : ev_watcher |
413 | struct base : ev_watcher |
414 | { |
414 | { |
415 | #if EV_MULTIPLICITY |
415 | #if EV_MULTIPLICITY |
416 | EV_PX; |
416 | EV_PX; |
417 | |
417 | |
|
|
418 | // loop set |
418 | void set (EV_P) throw () |
419 | void set (EV_P) throw () |
419 | { |
420 | { |
420 | this->EV_A = EV_A; |
421 | this->EV_A = EV_A; |
421 | } |
422 | } |
422 | #endif |
423 | #endif |
… | |
… | |
478 | } |
479 | } |
479 | |
480 | |
480 | template<class K, void (K::*method)()> |
481 | template<class K, void (K::*method)()> |
481 | static void method_noargs_thunk (EV_P_ ev_watcher *w, int revents) |
482 | static void method_noargs_thunk (EV_P_ ev_watcher *w, int revents) |
482 | { |
483 | { |
483 | static_cast<K *>(w->data)->*method |
484 | (static_cast<K *>(w->data)->*method) |
484 | (); |
485 | (); |
485 | } |
486 | } |
486 | |
487 | |
487 | void operator ()(int events = EV_UNDEF) |
488 | void operator ()(int events = EV_UNDEF) |
488 | { |
489 | { |
… | |
… | |
781 | EV_END_WATCHER (fork, fork) |
782 | EV_END_WATCHER (fork, fork) |
782 | #endif |
783 | #endif |
783 | |
784 | |
784 | #if EV_ASYNC_ENABLE |
785 | #if EV_ASYNC_ENABLE |
785 | EV_BEGIN_WATCHER (async, async) |
786 | EV_BEGIN_WATCHER (async, async) |
786 | void set () throw () { } |
|
|
787 | |
|
|
788 | void send () throw () |
787 | void send () throw () |
789 | { |
788 | { |
790 | ev_async_send (EV_A_ static_cast<ev_async *>(this)); |
789 | ev_async_send (EV_A_ static_cast<ev_async *>(this)); |
791 | } |
790 | } |
792 | |
791 | |