Panda3D
|
This is the specialization of PointerToVoid for weak pointers. More...
#include "weakPointerToVoid.h"
Public Member Functions | |
WeakPointerCallback * | get_callback () const |
Returns the callback that will be made when the pointer is deleted, or NULL if no callback has been set. More... | |
bool | is_valid_pointer () const |
Returns true if the pointer is not null and the object has not been deleted. More... | |
void | mark_deleted () |
This is intended only to be called by the WeakPointerList destructor. More... | |
void | set_callback (WeakPointerCallback *callback) |
Sets a callback that will be made when the pointer is deleted. More... | |
bool | was_deleted () const |
Returns true if the object we are pointing to has been deleted, false otherwise. More... | |
![]() | |
size_t | get_hash () const |
bool | is_null () const |
Returns true if the PointerTo is a NULL pointer, false otherwise. More... | |
bool | operator!= (const PointerToVoid &other) const |
bool | operator< (const void *other) const |
bool | operator< (const PointerToVoid &other) const |
bool | operator== (const PointerToVoid &other) const |
void | swap (PointerToVoid &other) NOEXCEPT |
Swaps the contents of this PointerTo with the other, without touching the reference counts. More... | |
This is the specialization of PointerToVoid for weak pointers.
It needs an additional flag to indicate that the pointer has been deleted.
Definition at line 28 of file weakPointerToVoid.h.
|
inline |
Returns the callback that will be made when the pointer is deleted, or NULL if no callback has been set.
Definition at line 79 of file weakPointerToVoid.I.
References was_deleted().
Referenced by set_callback().
|
inline |
Returns true if the pointer is not null and the object has not been deleted.
Definition at line 101 of file weakPointerToVoid.I.
Referenced by was_deleted().
|
inline |
This is intended only to be called by the WeakPointerList destructor.
It indicates that the object that we were pointing to has just been deleted.
Definition at line 45 of file weakPointerToVoid.I.
References set_callback().
|
inline |
Sets a callback that will be made when the pointer is deleted.
If a previous callback has already been set, it will be replaced.
If the pointer has already been deleted, the callback will be made immediately.
Definition at line 64 of file weakPointerToVoid.I.
References get_callback().
Referenced by mark_deleted().
|
inline |
Returns true if the object we are pointing to has been deleted, false otherwise.
Definition at line 90 of file weakPointerToVoid.I.
References is_valid_pointer().
Referenced by get_callback(), WeakPointerTo< T >::get_orig(), WeakConstPointerTo< T >::operator const T *(), WeakPointerTo< T >::operator T*(), WeakPointerTo< T >::p(), and WeakConstPointerTo< T >::p().