25 #ifndef _SharedPtr_h_Included
26 #define _SharedPtr_h_Included
56 if ((_reference = pObject) != 0)
58 _refCount = (
int*)::
odrxAlloc(
sizeof(
int*));
68 _reference = other._reference;
69 _refCount = other._refCount;
84 if (_refCount && !--*_refCount)
93 if (_reference != other._reference)
95 if (_refCount && !--*_refCount)
101 _reference = other._reference;
102 _refCount = other._refCount;
109 else if (_reference != 0)
134 T*
get() {
return _reference; }
143 const T*
get()
const {
return _reference; }
145 operator T*() {
return _reference; }
146 operator const T*()
const {
return _reference; }
163 bool isNull()
const {
return _reference == 0;}
189 return _refCount ? *_refCount : 0;
198 #endif // _SharedPtr_h_Included