PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/python/smartptr/smartptr.h

#
C++ Header | 13 lines | 12 code | 1 blank | 0 comment | 0 complexity | 65f291177990921a7e65c7b5c012f351 MD5 | raw file
 1template<class T> class SmartPtr {
 2public:
 3   SmartPtr(T *realPtr = 0) { pointee = realPtr; }
 4   T *operator->() const {
 5       return pointee;
 6   }
 7   T &operator*() const {
 8      return *pointee;
 9   }
10private:
11   T *pointee;
12};
13