Public Member Functions |
| void | AttachNew (csPtr< T > newObj) |
| | Assign an object reference created with the new operator to this smart pointer.
|
| | csRef () |
| | Construct an invalid smart pointer (that is, one pointing at nothing).
|
| | csRef (const csPtr< T > &newobj) |
| | Construct a smart pointer from a csPtr.
|
| | csRef (T *newobj) |
| | Construct a smart pointer from a raw object reference.
|
| template<class T2 > |
| | csRef (T2 *newobj) |
| | Construct a smart pointer from a raw object reference with a compatible type.
|
| template<class T2 > |
| | csRef (csRef< T2 > const &other) |
| | Smart pointer copy constructor from assignment-compatible csRef<T2>.
|
| | csRef (csRef const &other) |
| | Smart pointer copy constructor.
|
| uint | GetHash () const |
| | Return a hash value for this smart pointer.
|
| void | Invalidate () |
| | Invalidate the smart pointer by setting it to null.
|
| bool | IsValid () const |
| | Smart pointer validity check.
|
| | operator T * () const |
| | Cast smart pointer to a pointer to the underlying object.
|
| T & | operator* () const |
| | Dereference underlying object.
|
| T * | operator-> () const |
| | Dereference underlying object.
|
| csRef & | operator= (const csPtr< T > &newobj) |
| | Assign a csPtr to a smart pointer.
|
| csRef & | operator= (T *newobj) |
| | Assign a raw object reference to this smart pointer.
|
| template<class T2 > |
| csRef & | operator= (csRef< T2 > const &other) |
| | Assign another assignment-compatible csRef<T2> to this one.
|
| csRef & | operator= (csRef const &other) |
| | Assign another csRef<> of the same type to this one.
|
| | ~csRef () |
| | Smart pointer destructor.
|
Friends |
| bool | operator!= (const csRef &r1, const csRef &r2) |
| | Test if the two references point to different object.
|
| bool | operator!= (const csRef &r1, T *obj) |
| | Test if object pointed to by reference is different from obj.
|
| bool | operator!= (T *obj, const csRef &r1) |
| | Test if object pointed to by reference is different from obj.
|
| bool | operator< (const csRef &r1, const csRef &r2) |
| | Test the relationship of the addresses of two objects.
|
| bool | operator== (const csRef &r1, const csRef &r2) |
| | Test if the two references point to same object.
|
| bool | operator== (const csRef &r1, T *obj) |
| | Test if object pointed to by reference is same as obj.
|
| bool | operator== (T *obj, const csRef &r1) |
| | Test if object pointed to by reference is same as obj.
|
template<class T>
class csRef< T >
A smart pointer.
Maintains and correctly manages a reference to a reference-counted object. This template requires only that the object type T implement the methods IncRef() and DecRef(). No other requirements are placed upon T.
Definition at line 135 of file ref.h.