#include <smartptr.h>
This class can be used for clean double indirection of objects, ie. when an object changes all those with one of these objects referencing it will see the changes. Great for volitle pointers.
Definition at line 316 of file smartptr.h.
get the contained pointer | |
T * | getPtr () |
T const * | getPtr () const |
assign smart pointer, remember this is | |
a reference to a pointer, not a pointer. | |
SmartPtrRef & | operator= (const SmartPtrRef &sp) |
T * | operator= (T *ptr) |
access members of T | |
ex.
T->myFunction() | |
T * | operator-> () |
T const * | operator-> () const |
De-reference like a regular pointer | |
ex (*mySmartPRef).myFunction() | |
T & | operator * () |
T const & | operator * () const |
utilities, comparison ops | |
just like raw ptrs, if(T != 0)...
if(T == NULL) | |
bool | operator! () const |
bool | operator== (const T *ptr) const |
bool | operator== (const SmartPtrRef &sp) const |
bool | operator!= (const T *ptr) const |
bool | operator!= (const SmartPtrRef &sp) const |
bool | operator< (const SmartPtrRef &sp) const |
these may or maynot be what you want! be carefull | |
bool | operator<= (const SmartPtrRef &sp) const |
bool | operator> (const SmartPtrRef &sp) const |
bool | operator>= (const SmartPtrRef &sp) const |
Public Types | |
typedef SmartPtr< T > | type |
Public Member Functions | |
SmartPtrRef () | |
SmartPtrRef (T *ptr) | |
SmartPtrRef (const SmartPtrRef &dsp) | |
SmartPtrRef (SmartPtr< T > *sp) | |
virtual | ~SmartPtrRef () |
operator T * () | |
Implicit conversion to T* (for function calls). | |
bool | isNull () const |
for convienence since if(mySP) is always true, use if(!myPtr.isNull())... | |
Protected Member Functions | |
void | assign (type *ref) |
Protected Attributes | |
type * | _ref |
Private from here down. |
|
Definition at line 318 of file smartptr.h. Referenced by gutz::SmartPtrRef< TFElement >::assign(), gutz::SmartPtrRef< TFElement >::SmartPtrRef(), and gutz::SmartPtrRef< TFElement >::~SmartPtrRef(). |
|
Definition at line 320 of file smartptr.h. |
|
Definition at line 321 of file smartptr.h. |
|
Definition at line 322 of file smartptr.h. |
|
Definition at line 323 of file smartptr.h. |
|
Definition at line 324 of file smartptr.h. |
|
add a reference to the new guy deleting the old guy just a dec most of the time but if we are the last reference, nuke it Definition at line 387 of file smartptr.h. Referenced by gutz::SmartPtrRef< TFElement >::SmartPtrRef(), and gutz::SmartPtrRef< TFElement >::~SmartPtrRef(). |
|
Definition at line 330 of file smartptr.h. |
|
|
for convienence since if(mySP) is always true, use if(!myPtr.isNull())...
Definition at line 380 of file smartptr.h. |
|
Definition at line 355 of file smartptr.h. |
|
Definition at line 354 of file smartptr.h. |
|
Implicit conversion to T* (for function calls).
Definition at line 360 of file smartptr.h. |
|
Definition at line 367 of file smartptr.h. |
|
Definition at line 371 of file smartptr.h. |
|
Definition at line 370 of file smartptr.h. |
|
Definition at line 347 of file smartptr.h. |
|
Definition at line 346 of file smartptr.h. |
|
these may or maynot be what you want! be carefull
Definition at line 373 of file smartptr.h. |
|
Definition at line 374 of file smartptr.h. |
|
Definition at line 339 of file smartptr.h. |
|
Definition at line 337 of file smartptr.h. |
|
Definition at line 369 of file smartptr.h. |
|
Definition at line 368 of file smartptr.h. |
|
Definition at line 375 of file smartptr.h. |
|
Definition at line 376 of file smartptr.h. |
|
Private from here down.
Definition at line 385 of file smartptr.h. Referenced by gutz::SmartPtrRef< TFElement >::assign(), gutz::SmartPtrRef< TFElement >::getPtr(), gutz::SmartPtrRef< TFElement >::operator T *(), gutz::SmartPtrRef< TFElement >::operator=(), and gutz::SmartPtrRef< TFElement >::SmartPtrRef(). |