aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libvtv/testsuite/libvtv.cc/event.h
blob: 61e1d7c917265b56761d6bda0a9ce37b05215835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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();
};