17 #ifndef ZORBA_SMARTPTR_API_H
18 #define ZORBA_SMARTPTR_API_H
20 #include <zorba/config.h>
43 if (--theRefCount == 0)
57 if (
p != 0)
p->addReference();
64 if (
p)
p->removeReference();
65 p =
static_cast<T*
>(rhs.
get());
88 T*
get()
const {
return p; }
90 operator T* () {
return get(); }
91 operator const T * ()
const {
return get(); }
bool operator<(const SmartPtr &h) const
bool operator==(SmartPtr const &h) const
SmartPtr & assign(const SmartPtr< otherT > &rhs)
SmartObject(const SmartObject &)
void addReference() const
SmartPtr(SmartPtr const &rhs)
bool operator==(T const *pp) const
SmartPtr & operator=(SmartPtr const &rhs)
SmartObject & operator=(const SmartObject &)
bool operator!=(SmartPtr const &h) const
bool operator!=(T const *pp) const
SmartPtr & operator=(SmartPtr< otherT > const &rhs)