X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/d1d02ca0040b567cfc3081701b52b0361412a444..7633bcdce9c376b70aca8166696f360a4e5bbddc:/ev%20%20.h/software/libev.git/blobdiff_plain/d1d02ca0040b567cfc3081701b52b0361412a444..7633bcdce9c376b70aca8166696f360a4e5bbddc:/ev++.h?ds=sidebyside diff --git a/ev++.h b/ev++.h index 95d0a76..500d596 100644 --- a/ev++.h +++ b/ev++.h @@ -46,6 +46,21 @@ namespace ev { #include "ev.h" + enum { + UNDEF = EV_UNDEF, + NONE = EV_NONE, + READ = EV_READ, + WRITE = EV_WRITE, + TIMEOUT = EV_TIMEOUT, + PERIODIC = EV_PERIODIC, + SIGNAL = EV_SIGNAL, + IDLE = EV_IDLE, + CHECK = EV_CHECK, + PREPARE = EV_PREPARE, + CHILD = EV_CHILD, + ERROR = EV_ERROR, + }; + typedef ev_tstamp tstamp; inline ev_tstamp now (EV_P) @@ -114,6 +129,11 @@ namespace ev { return call (this, events); \ } \ \ + ~cppstem () \ + { \ + stop (); \ + } \ + \ private: \ \ cppstem (const cppstem &o) \ @@ -168,6 +188,7 @@ namespace ev { } }; + #if EV_PERIODICS EV_DECLARE_WATCHER (periodic, periodic) void set (ev_tstamp at, ev_tstamp interval = 0.) { @@ -188,6 +209,7 @@ namespace ev { ev_periodic_again (EV_A_ static_cast(this)); } }; + #endif EV_DECLARE_WATCHER (idle, idle) };