33 #ifndef __XPLC_PTR_H__ 34 #define __XPLC_PTR_H__ 36 #if defined(__GNUC__) && __GNUC__ > 3 37 # pragma GCC system_header 48 #error "xplc_ptr is experimental!" 60 class ProtectedPtr:
public T {
62 virtual unsigned int addRef() = 0;
63 virtual unsigned int release() = 0;
64 #ifndef __XPLC_DELETE_H__ 65 void operator delete(
void*);
105 return static_cast<ProtectedPtr*
>(ptr);
112 operator ProtectedPtr*()
const {
113 return static_cast<ProtectedPtr*
>(ptr);
xplc_ptr(const xplc_ptr< P > &aObj)
Construct an xplc_ptr from another xplc_ptr.
xplc_ptr & operator=(T *_ptr)
Assign a raw pointer to an xplc_ptr.
T * do_addRef(T *obj)
Used to addRef an object before passing it to something that would otherwise "steal" the reference...
ProtectedPtr * operator->() const
Provide an operator->.
xplc_ptr(T *aObj)
Construct an xplc_ptr from a raw pointer.
Smart pointer class for XPLC interfaces.
This file contains the XPLC foundation interface.