26 ~SoRef() {
if (_object) _object->unref(); }
45 return _object == p._object;
49 return !( *
this == p );
66 operator T*()
const {
return _object; }
69 T*
ptr()
const {
return _object; }
72 T*
get()
const {
return _object; }
80 _object->unrefNoDelete();
89 T* oldObject = _object;
91 if (_object) _object->ref();
92 if (oldObject) oldObject->unref();
SoRef proves an intrusive smart pointer for any SoBase derived class and uses the ref()/unref() metho...
bool operator==(T *p) const
SoRef< T > & operator=(const SoRef< T2 > &p)
T * releaseNoDelete()
Get access to the underlying pointer without deleting the object.
SoRef< T > & operator=(T *o)
SoRef(const SoRef< T > &p)
bool operator!=(const SoRef< T > &p) const
T * get() const
Get access to the underlying pointer.
T * ptr() const
Get access to the underlying pointer (VSG compatibility).
SoRef< T > & operator=(const SoRef< T > &p)
bool operator==(const SoRef< T > &p) const