Panda3D
|
A WeakConstPointerTo is similar to a WeakPointerTo, except it keeps a const pointer to the thing, that will be cleared to NULL when the thing deleted. More...
#include "weakPointerTo.h"
Public Types | |
typedef WeakPointerToBase< T >::To | To |
![]() | |
typedef T | To |
Public Member Functions | |
WeakConstPointerTo (const To *ptr=(const To *) NULL) | |
WeakConstPointerTo (const PointerTo< T > ©) | |
WeakConstPointerTo (const ConstPointerTo< T > ©) | |
WeakConstPointerTo (const WeakPointerTo< T > ©) | |
WeakConstPointerTo (const WeakConstPointerTo< T > ©) | |
void | clear () |
const To * | get_orig () const |
Returns the original pointer value, even if the object has since been deleted. More... | |
bool | is_null () const |
operator const T * () const | |
We also have the typecast operator to automatically convert WeakConstPointerTo's to the required kind of actual pointer. More... | |
const To & | operator* () const |
const To * | operator-> () const |
WeakConstPointerTo< T > & | operator= (const To *ptr) |
WeakConstPointerTo< T > & | operator= (const PointerTo< T > ©) |
WeakConstPointerTo< T > & | operator= (const ConstPointerTo< T > ©) |
WeakConstPointerTo< T > & | operator= (const WeakPointerTo< T > ©) |
WeakConstPointerTo< T > & | operator= (const WeakConstPointerTo< T > ©) |
const To * | p () const |
Returns an ordinary pointer instead of a WeakConstPointerTo. More... | |
![]() | |
void | clear () |
A convenient way to set the PointerTo object to NULL. More... | |
bool | operator!= (const To *other) const |
bool | operator!= (To *other) const |
bool | operator!= (const WeakPointerToBase< To > &other) const |
bool | operator!= (const PointerToBase< To > &other) const |
bool | operator< (const To *other) const |
bool | operator< (const WeakPointerToBase< To > &other) const |
bool | operator< (const PointerToBase< To > &other) const |
bool | operator<= (const To *other) const |
bool | operator<= (To *other) const |
bool | operator<= (const WeakPointerToBase< To > &other) const |
bool | operator<= (const PointerToBase< To > &other) const |
bool | operator== (const To *other) const |
bool | operator== (To *other) const |
bool | operator== (const WeakPointerToBase< To > &other) const |
bool | operator== (const PointerToBase< To > &other) const |
bool | operator> (const To *other) const |
bool | operator> (To *other) const |
bool | operator> (const WeakPointerToBase< To > &other) const |
bool | operator> (const PointerToBase< To > &other) const |
bool | operator>= (const To *other) const |
bool | operator>= (To *other) const |
bool | operator>= (const WeakPointerToBase< To > &other) const |
bool | operator>= (const PointerToBase< To > &other) const |
void | output (ostream &out) const |
A handy function to output PointerTo's as a hex pointer followed by a reference count. More... | |
void | refresh () const |
Informs the WeakPointerTo object that its pointer is no longer deleted. More... | |
![]() | |
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... | |
A WeakConstPointerTo is similar to a WeakPointerTo, except it keeps a const pointer to the thing, that will be cleared to NULL when the thing deleted.
Definition at line 69 of file weakPointerTo.h.
|
inline |
Returns the original pointer value, even if the object has since been deleted.
Definition at line 277 of file weakPointerTo.I.
Referenced by WeakConstPointerTo< T >::p().
|
inline |
We also have the typecast operator to automatically convert WeakConstPointerTo's to the required kind of actual pointer.
This introduces ambiguities which the compiler will resolve one way or the other, but we don't care which way it goes because either will be correct.
Definition at line 250 of file weakPointerTo.I.
References WeakConstPointerTo< T >::p(), and WeakPointerToVoid::was_deleted().
|
inline |
Returns an ordinary pointer instead of a WeakConstPointerTo.
Useful to work around compiler problems, particularly for implicit upcasts.
Definition at line 264 of file weakPointerTo.I.
References WeakConstPointerTo< T >::get_orig(), and WeakPointerToVoid::was_deleted().
Referenced by WeakConstPointerTo< T >::operator const T *().