]> git.llucax.com Git - software/libev.git/blobdiff - ev++.h
cna you say fuck?
[software/libev.git] / ev++.h
diff --git a/ev++.h b/ev++.h
index 95d0a76d117d184b766fdbe67885506ae7f06f20..500d596cd3d4d0bc408f97ad9b8efd66cd266bdc 100644 (file)
--- 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<ev_periodic *>(this));
     }
   };
+  #endif
 
   EV_DECLARE_WATCHER (idle, idle)
   };