112 m_pointer = that.
ptr();
120 T* p =
dynamic_cast<T*
>(m_pointer);
123 m_pointer->unrefNoDelete();
133 (*this) = (T*)(that.m_pointer);
141 (*this) =
dynamic_cast<T*
>(that.
ptr());
148 if (m_pointer !=
ptr) {
160 {
return *((T*)m_pointer); }
164 {
return ((T*)(m_pointer)); }
168 {
return ((T*)(m_pointer)); }
Implements smart pointers to SoRefCounter objects.
Smart pointer for any class inheriting SoRefCounter.
SoRef(T *pIn)
Construct from C++ pointer.
SoRef(const SoRef< Y > &that)
Construct from another SoRef.
T & operator*() const
Dereference pointer.
T * operator->() const
Cast to C pointer.
SoRef< T > & operator=(const SoRef< Y > &that)
Assign to another SoRef if the types are assignable (from derived to base classes).
SoRef< T > & operator=(T *ptr)
Assign ordinary C pointer.
SoRef(const SoRef< T > &that)
Copy constructor.
T * releaseNoDelete()
Release reference and return the object stored.
SoRef< T > & operator=(const SoRef< T > &that)
Assign another SoRef.
SoRef()
Default constructor.
T * ptr() const
Cast to C pointer.