aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libvtv/testsuite/libvtv.cc/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libvtv/testsuite/libvtv.cc/event.h')
-rw-r--r--gcc-4.9/libvtv/testsuite/libvtv.cc/event.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc-4.9/libvtv/testsuite/libvtv.cc/event.h b/gcc-4.9/libvtv/testsuite/libvtv.cc/event.h
new file mode 100644
index 000000000..61e1d7c91
--- /dev/null
+++ b/gcc-4.9/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();
+};