Public Member Functions | |
TReleaseOnlyReferenceCountedSmartPointer () | |
Construct an empty smart pointer. | |
TReleaseOnlyReferenceCountedSmartPointer (T *ref) | |
Construct a smart pointer that takes ownership of the supplied object. | |
TReleaseOnlyReferenceCountedSmartPointer (T &ref) | |
Construct a smart pointer that takes ownership of the supplied object. | |
TReleaseOnlyReferenceCountedSmartPointer (TReleaseOnlyReferenceCountedSmartPointer< T > &rhs) | |
Copy construct a smart pointer from the supplied smart pointer. Note that ownership moves from the rhs' pointer to the newly constructed pointer, the 'rhs' pointer ends up with a 0 reference. | |
TReleaseOnlyReferenceCountedSmartPointer & | operator= (TReleaseOnlyReferenceCountedSmartPointer< T > &rhs) |
TReleaseOnlyReferenceCountedSmartPointer & | operator= (T *ref) |
~TReleaseOnlyReferenceCountedSmartPointer () | |
T * | operator-> () |
Access the managed object. If JETBYTE_REFERENCE_COUNTED_SMART_POINTER_THROW_ON_NULL_REFERENCE is defined as 1 then this will throw an exception if the smart pointer is not currently managing an object! | |
const T * | operator-> () const |
Access the managed object. If JETBYTE_REFERENCE_COUNTED_SMART_POINTER_THROW_ON_NULL_REFERENCE is defined as 1 then this will throw an exception if the smart pointer is not currently managing an object! | |
T * | Get () |
const T * | Get () const |
T & | GetRef () |
Obtain a reference to the managed object. If JETBYTE_REFERENCE_COUNTED_SMART_POINTER_THROW_ON_NULL_REFERENCE is defined as 1 then this will throw an exception if the smart pointer is not currently managing an object! | |
const T & | GetRef () const |
Obtain a reference to the managed object. If JETBYTE_REFERENCE_COUNTED_SMART_POINTER_THROW_ON_NULL_REFERENCE is defined as 1 then this will throw an exception if the smart pointer is not currently managing an object! | |
T * | Detach () |
Detach the managed object from the smart pointer and return it to the caller. The caller now owns the object and is responsible for calling Release() on it when it is finished with it. | |
void | Release () |
Detach the managed object from the smart pointer and call release on it. Note that it's safe to call this on an object even if it isn't currently managing an object. | |
Static Public Member Functions | |
static T * | SafeRelease (T *ref) |
TReleaseOnlyReferenceCountedSmartPointer | ( | ) | [inline] |
Construct an empty smart pointer.
TReleaseOnlyReferenceCountedSmartPointer | ( | T * | ref | ) | [inline, explicit] |
Construct a smart pointer that takes ownership of the supplied object.
TReleaseOnlyReferenceCountedSmartPointer | ( | T & | ref | ) | [inline, explicit] |
Construct a smart pointer that takes ownership of the supplied object.
TReleaseOnlyReferenceCountedSmartPointer | ( | TReleaseOnlyReferenceCountedSmartPointer< T > & | rhs | ) | [inline] |
Copy construct a smart pointer from the supplied smart pointer. Note that ownership moves from the rhs' pointer to the newly constructed pointer, the 'rhs' pointer ends up with a 0 reference.
~TReleaseOnlyReferenceCountedSmartPointer | ( | ) | [inline] |
TReleaseOnlyReferenceCountedSmartPointer< T > & operator= | ( | TReleaseOnlyReferenceCountedSmartPointer< T > & | rhs | ) | [inline] |
TReleaseOnlyReferenceCountedSmartPointer< T > & operator= | ( | T * | ref | ) | [inline] |
T * operator-> | ( | ) | [inline] |
Access the managed object. If JETBYTE_REFERENCE_COUNTED_SMART_POINTER_THROW_ON_NULL_REFERENCE is defined as 1 then this will throw an exception if the smart pointer is not currently managing an object!
const T * operator-> | ( | ) | const [inline] |
Access the managed object. If JETBYTE_REFERENCE_COUNTED_SMART_POINTER_THROW_ON_NULL_REFERENCE is defined as 1 then this will throw an exception if the smart pointer is not currently managing an object!
T * Get | ( | ) | [inline] |
const T * Get | ( | ) | const [inline] |
T & GetRef | ( | ) | [inline] |
Obtain a reference to the managed object. If JETBYTE_REFERENCE_COUNTED_SMART_POINTER_THROW_ON_NULL_REFERENCE is defined as 1 then this will throw an exception if the smart pointer is not currently managing an object!
const T & GetRef | ( | ) | const [inline] |
Obtain a reference to the managed object. If JETBYTE_REFERENCE_COUNTED_SMART_POINTER_THROW_ON_NULL_REFERENCE is defined as 1 then this will throw an exception if the smart pointer is not currently managing an object!
T * Detach | ( | ) | [inline] |
Detach the managed object from the smart pointer and return it to the caller. The caller now owns the object and is responsible for calling Release() on it when it is finished with it.
void Release | ( | ) | [inline] |
Detach the managed object from the smart pointer and call release on it. Note that it's safe to call this on an object even if it isn't currently managing an object.
T * SafeRelease | ( | T * | ref | ) | [inline, static] |