X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fbase%2Fsmartptr.h;h=782ff48e913049fb8e00cb528843917275399641;hp=6c3dbc2f0f9c6502a8df06e3f13c8caa311fb601;hb=2e0270746af934180499931f95ed91c444c8233e;hpb=86470f194147f01561a0d371eb8eb8977eccaa93 diff --git a/lib/base/smartptr.h b/lib/base/smartptr.h index 6c3dbc2..782ff48 100644 --- a/lib/base/smartptr.h +++ b/lib/base/smartptr.h @@ -54,8 +54,10 @@ public: ptr->Release(); } +#ifndef SWIG T* grabRef() { if (!ptr) return 0; ptr->AddRef(); return ptr; } T* &ptrref() { assert(!ptr); return ptr; } +#endif T* operator->() const { ptrAssert(ptr); return ptr; } operator T*() const { return this->ptr; } @@ -131,8 +133,10 @@ public: } } +#ifndef SWIG T* grabRef() { if (!ptr) return 0; ptr->AddRef(); ptr->AddUse(); return ptr; } T* &ptrref() { assert(!ptr); return ptr; } +#endif T* operator->() const { ptrAssert(ptr); return ptr; } operator T*() const { return this->ptr; } };