WeakRefPtr

Engine/source/core/util/refBase.h

Weak reference pointer class.

More...

Public Friends

Public Functions

WeakRefPtr(T * ptr)
T *

Returns the pointer.

bool

Returns true if the pointer is not set.

bool

Returns true if the pointer is set.

operator=(T * ptr)

Protected Functions

Detailed Description

Weak reference pointer class.

Instances of this template class can be used as pointers to instances of WeakRefBase and its subclasses. When the object referenced by a WeakRefPtr instance is deleted, the pointer to the object is set to NULL in the WeakRefPtr instance.

Public Friends

Private Attributes

WeakRefBase::WeakReference * mReference 

Public Functions

WeakRefPtr()

WeakRefPtr(const WeakRefPtr< T > & ref)

WeakRefPtr(T * ptr)

~WeakRefPtr()

getPointer()

Returns the pointer.

isNull()

Returns true if the pointer is not set.

isValid()

Returns true if the pointer is set.

operator T*()

operator*()

operator->()

operator=(const WeakRefPtr< T > & ref)

operator=(T * ptr)

Protected Functions

set(T * obj)

set(WeakRefBase::WeakReference * ref)