summaryrefslogtreecommitdiff
path: root/Examples/python/smartptr/smartptr.h
blob: 2ffa1ca0e0365eee4486c081b13b0d5d2db44ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
template<class T> class SmartPtr {
public:
   SmartPtr(T *realPtr = 0) { pointee = realPtr; }
   T *operator->() const {
       return pointee;
   }
   T &operator*() const {
      return *pointee;
   }
private:
   T *pointee;
};