10 #include "scribusapi.h"
41 bool operator==(
const ScGuardedPtr<T> &p )
const {
return (T*)(*this) == (T*) p;}
42 bool operator!= (
const ScGuardedPtr<T>& p )
const {
return !( *
this == p ); }
46 T* operator->()
const {
return (T*)(data ? data->pointer : 0); }
47 T& operator*()
const {
return *((T*)(data ? data->pointer : 0)); }
48 operator T*()
const {
return (T*)(data ? data->pointer : 0); }
99 if (data != other.data)
101 ++(other.data->refs);
112 return (data->pointer == 0);
119 if (data && --(data->refs) == 0)
151 this->data->pointer = 0;
Definition: scguardedptr.h:18
Definition: scguardedptr.h:30
Definition: scguardedptr.h:54