summaryrefslogtreecommitdiff
path: root/libvtv/testsuite/libvtv.cc/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'libvtv/testsuite/libvtv.cc/event.h')
-rw-r--r--libvtv/testsuite/libvtv.cc/event.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/libvtv/testsuite/libvtv.cc/event.h b/libvtv/testsuite/libvtv.cc/event.h
new file mode 100644
index 00000000000..61e1d7c9172
--- /dev/null
+++ b/libvtv/testsuite/libvtv.cc/event.h
@@ -0,0 +1,29 @@
+class RefCountedBase {
+protected:
+ bool derefBase()
+ {
+ return true;
+ }
+};
+
+template<typename T> class RefCounted : public RefCountedBase {
+public:
+ void deref()
+ {
+ if (derefBase())
+ delete static_cast<T*>(this);
+ }
+
+protected:
+ // RefCounted() { }
+ ~RefCounted()
+ {
+ }
+};
+
+
+class Event : public RefCounted<Event> {
+ public:
+ Event();
+ virtual ~Event();
+};