diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-06-13 09:57:56 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-06-13 09:57:56 +0000 |
| commit | 2e0270746af934180499931f95ed91c444c8233e (patch) | |
| tree | 8a3347e3ba191a05067d2ad43b23c221d9cc9fff /lib/base/object.h | |
| parent | 86470f194147f01561a0d371eb8eb8977eccaa93 (diff) | |
| download | enigma2-2e0270746af934180499931f95ed91c444c8233e.tar.gz enigma2-2e0270746af934180499931f95ed91c444c8233e.zip | |
after DECLARE_REF now all is private.. not public
dont export AddRef, Release, ptrref and grabRef to python
some cleanups
Diffstat (limited to 'lib/base/object.h')
| -rw-r--r-- | lib/base/object.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/lib/base/object.h b/lib/base/object.h index 1723a885..f0e0e9a5 100644 --- a/lib/base/object.h +++ b/lib/base/object.h @@ -18,9 +18,15 @@ private: void operator=(const iObject &); protected: virtual ~iObject() { } +#ifdef SWIG + virtual void AddRef()=0; + virtual void Release()=0; +#endif public: +#ifndef SWIG virtual void AddRef()=0; virtual void Release()=0; +#endif }; #ifndef SWIG @@ -43,10 +49,10 @@ public: #if defined(OBJECT_DEBUG) extern int object_total_remaining; #define DECLARE_REF(x) \ - private:oRefCount ref; \ - eSingleLock ref_lock; \ public: void AddRef(); \ - void Release(); + void Release(); \ + private:oRefCount ref; \ + eSingleLock ref_lock; #define DEFINE_REF(c) \ void c::AddRef() \ { \ @@ -68,9 +74,9 @@ public: } #elif defined(__mips__) #define DECLARE_REF(x) \ - private: oRefCount ref; \ public: void AddRef(); \ - void Release(); + void Release(); \ + private: oRefCount ref; #define DEFINE_REF(c) \ void c::AddRef() \ { \ @@ -108,9 +114,9 @@ public: } #elif defined(__ppc__) || defined(__powerpc__) #define DECLARE_REF(x) \ - private: oRefCount ref; \ public: void AddRef(); \ - void Release(); + void Release(); \ + private: oRefCount ref; #define DEFINE_REF(c) \ void c::AddRef() \ { \ @@ -142,9 +148,9 @@ public: } #elif defined(__i386__) || defined(__x86_64__) #define DECLARE_REF(x) \ - private: oRefCount ref; \ public: void AddRef(); \ - void Release(); + void Release(); \ + private: oRefCount ref; #define DEFINE_REF(c) \ void c::AddRef() \ { \ @@ -165,10 +171,10 @@ public: #else #warning use non optimized implementation of refcounting. #define DECLARE_REF(x) \ - private:oRefCount ref; \ - eSingleLock ref_lock; \ public: void AddRef(); \ - void Release(); + void Release(); \ + private:oRefCount ref; \ + eSingleLock ref_lock; #define DEFINE_REF(c) \ void c::AddRef() \ { \ @@ -190,9 +196,6 @@ public: private: \ void AddRef(); \ void Release(); - class Object - { - }; #endif // SWIG #endif // __base_object_h |
