Panda3D
|
This is the base class for PointerTo and ConstPointerTo. More...
#include "weakPointerToBase.h"
Public Types | |
typedef T | To |
Public Member Functions | |
void | clear () |
A convenient way to set the PointerTo object to NULL. | |
bool | operator!= (const PointerToBase< To > &other) const |
Returns false if both pointers point to the same object. | |
bool | operator!= (const To *other) const |
bool | operator!= (const WeakPointerToBase< To > &other) const |
bool | operator!= (std::nullptr_t) const |
bool | operator!= (To *other) const |
bool | operator< (const PointerToBase< To > &other) const |
bool | operator< (const To *other) const |
bool | operator< (const WeakPointerToBase< To > &other) const |
Defines an ordering between WeakPointerTo based on their raw pointer value. | |
bool | operator< (std::nullptr_t) const |
bool | operator<= (const PointerToBase< To > &other) const |
bool | operator<= (const To *other) const |
bool | operator<= (const WeakPointerToBase< To > &other) const |
Defines an ordering between WeakPointerTo based on their raw pointer value. | |
bool | operator<= (std::nullptr_t) const |
bool | operator<= (To *other) const |
bool | operator== (const PointerToBase< To > &other) const |
Returns true if both pointers point to the same object. | |
bool | operator== (const To *other) const |
bool | operator== (const WeakPointerToBase< To > &other) const |
Returns true if both pointers have the same raw pointer value. | |
bool | operator== (std::nullptr_t) const |
bool | operator== (To *other) const |
bool | operator> (const PointerToBase< To > &other) const |
bool | operator> (const To *other) const |
bool | operator> (const WeakPointerToBase< To > &other) const |
Defines an ordering between WeakPointerTo based on their raw pointer value. | |
bool | operator> (std::nullptr_t) const |
bool | operator> (To *other) const |
bool | operator>= (const PointerToBase< To > &other) const |
bool | operator>= (const To *other) const |
bool | operator>= (const WeakPointerToBase< To > &other) const |
Defines an ordering between WeakPointerTo based on their raw pointer value. | |
bool | operator>= (std::nullptr_t) const |
bool | operator>= (To *other) const |
void | output (std::ostream &out) const |
A handy function to output PointerTo's as a hex pointer followed by a reference count. | |
template<class Y > | |
bool | owner_before (const PointerToBase< Y > &other) const noexcept |
Defines an ordering that is guaranteed to remain consistent even after this weak pointer has expired. | |
template<class Y > | |
bool | owner_before (const WeakPointerToBase< Y > &other) const noexcept |
Defines an ordering that is guaranteed to remain consistent even after the weak pointers have expired. | |
void | refresh () const |
Informs the WeakPointerTo object that its pointer is no longer deleted. | |
![]() | |
void | add_callback (WeakPointerCallback *callback) const |
Sets a callback that will be made when the pointer is deleted. | |
bool | is_valid_pointer () const |
Returns true if the pointer is not null and the object has not been deleted. | |
void | remove_callback (WeakPointerCallback *callback) const |
Removes a previously added callback. | |
bool | was_deleted () const |
Returns true if the object we are pointing to has been deleted, false otherwise. | |
![]() | |
size_t | get_hash () const |
constexpr bool | is_null () const |
Returns true if the PointerTo is a NULL pointer, false otherwise. | |
bool | operator!= (const PointerToVoid &other) const |
bool | operator< (const PointerToVoid &other) const |
bool | operator< (const void *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. | |
![]() | |
void | operator delete (void *, void *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
This is the base class for PointerTo and ConstPointerTo.
Don't try to use it directly; use either derived class instead.
Definition at line 26 of file weakPointerToBase.h.
typedef T WeakPointerToBase< T >::To |
Definition at line 28 of file weakPointerToBase.h.
|
inline |
A convenient way to set the PointerTo object to NULL.
(Assignment to a NULL pointer also works, of course.)
Definition at line 622 of file weakPointerToBase.I.
References WeakReferenceList::unref().
|
inline |
Returns false if both pointers point to the same object.
Definition at line 517 of file weakPointerToBase.I.
|
inline |
Definition at line 331 of file weakPointerToBase.I.
|
inline |
Definition at line 469 of file weakPointerToBase.I.
|
inline |
Definition at line 420 of file weakPointerToBase.I.
|
inline |
Definition at line 375 of file weakPointerToBase.I.
|
inline |
Definition at line 581 of file weakPointerToBase.I.
|
inline |
Definition at line 553 of file weakPointerToBase.I.
|
inline |
Defines an ordering between WeakPointerTo based on their raw pointer value.
Definition at line 572 of file weakPointerToBase.I.
|
inline |
Definition at line 562 of file weakPointerToBase.I.
|
inline |
Definition at line 535 of file weakPointerToBase.I.
|
inline |
Definition at line 349 of file weakPointerToBase.I.
|
inline |
Defines an ordering between WeakPointerTo based on their raw pointer value.
Definition at line 489 of file weakPointerToBase.I.
|
inline |
Definition at line 438 of file weakPointerToBase.I.
|
inline |
Definition at line 393 of file weakPointerToBase.I.
|
inline |
Returns true if both pointers point to the same object.
Definition at line 508 of file weakPointerToBase.I.
|
inline |
Definition at line 322 of file weakPointerToBase.I.
|
inline |
Returns true if both pointers have the same raw pointer value.
For this to be meaningful, neither pointer may have expired, since if one has expired while the other was allocated at the expired pointer's memory address, this comparison will be true even though they didn't refer to the same object.
Definition at line 460 of file weakPointerToBase.I.
|
inline |
Definition at line 411 of file weakPointerToBase.I.
|
inline |
Definition at line 366 of file weakPointerToBase.I.
|
inline |
Definition at line 526 of file weakPointerToBase.I.
|
inline |
Definition at line 340 of file weakPointerToBase.I.
|
inline |
Defines an ordering between WeakPointerTo based on their raw pointer value.
Definition at line 479 of file weakPointerToBase.I.
|
inline |
Definition at line 429 of file weakPointerToBase.I.
|
inline |
Definition at line 384 of file weakPointerToBase.I.
|
inline |
Definition at line 544 of file weakPointerToBase.I.
|
inline |
Definition at line 358 of file weakPointerToBase.I.
|
inline |
Defines an ordering between WeakPointerTo based on their raw pointer value.
Definition at line 499 of file weakPointerToBase.I.
|
inline |
Definition at line 447 of file weakPointerToBase.I.
|
inline |
Definition at line 402 of file weakPointerToBase.I.
|
inline |
A handy function to output PointerTo's as a hex pointer followed by a reference count.
Definition at line 655 of file weakPointerToBase.I.
References WeakReferenceList::was_deleted().
|
inlinenoexcept |
Defines an ordering that is guaranteed to remain consistent even after this weak pointer has expired.
This may result in two pointers with the same get_orig() value comparing unequal if one of them is a new object that was allocated at the same memory address as the older, expired pointer.
Definition at line 609 of file weakPointerToBase.I.
|
inlinenoexcept |
Defines an ordering that is guaranteed to remain consistent even after the weak pointers have expired.
This may result in two pointers with the same get_orig() value comparing unequal if one of them is a new object that was allocated at the same memory address as the older, expired pointer.
Definition at line 596 of file weakPointerToBase.I.
|
inline |
Informs the WeakPointerTo object that its pointer is no longer deleted.
This may be used after a WeakPointerTo has deleted a deleted pointer, and then a new pointer has been reallocated. It's equivalent to simply reassigning the pointer to its new (i.e. original) value, but has the advantage that it is const, so can be used for WeakPointers used as keys in STL maps and sets.
Definition at line 643 of file weakPointerToBase.I.
Definition at line 104 of file weakPointerToBase.h.