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 ConstPointerTo< T > ©) | |
template<class Y > | |
WeakConstPointerTo (const ConstPointerTo< Y > &r) noexcept | |
WeakConstPointerTo (const PointerTo< T > ©) | |
template<class Y > | |
WeakConstPointerTo (const PointerTo< Y > &r) noexcept | |
WeakConstPointerTo (const To *ptr) | |
WeakConstPointerTo (const WeakConstPointerTo< T > ©) | |
template<class Y > | |
WeakConstPointerTo (const WeakConstPointerTo< Y > &r) noexcept | |
WeakConstPointerTo (const WeakPointerTo< T > ©) | |
template<class Y > | |
WeakConstPointerTo (const WeakPointerTo< Y > &r) noexcept | |
WeakConstPointerTo (WeakConstPointerTo< T > &&from) noexcept | |
template<class Y > | |
WeakConstPointerTo (WeakConstPointerTo< Y > &&r) noexcept | |
WeakConstPointerTo (WeakPointerTo< T > &&from) noexcept | |
template<class Y > | |
WeakConstPointerTo (WeakPointerTo< Y > &&r) noexcept | |
void | clear () |
const To * | get_orig () const |
Returns the original pointer value, even if the object has since been deleted. | |
bool | is_null () const |
ConstPointerTo< T > | lock () const |
A thread-safe way to access the underlying pointer; will silently return null if the underlying pointer was deleted or null. | |
operator const T * () const | |
We also have the typecast operator to automatically convert WeakConstPointerTo's to the required kind of actual pointer. | |
const To & | operator* () const |
const To * | operator-> () const |
WeakConstPointerTo< T > & | operator= (const ConstPointerTo< T > ©) |
template<class Y > | |
WeakConstPointerTo< T > & | operator= (const ConstPointerTo< Y > &r) noexcept |
WeakConstPointerTo< T > & | operator= (const PointerTo< T > ©) |
template<class Y > | |
WeakConstPointerTo< T > & | operator= (const PointerTo< Y > &r) noexcept |
WeakConstPointerTo< T > & | operator= (const To *ptr) |
WeakConstPointerTo< T > & | operator= (const WeakConstPointerTo< T > ©) |
template<class Y > | |
WeakConstPointerTo< T > & | operator= (const WeakConstPointerTo< Y > &r) noexcept |
WeakConstPointerTo< T > & | operator= (const WeakPointerTo< T > ©) |
template<class Y > | |
WeakConstPointerTo< T > & | operator= (const WeakPointerTo< Y > &r) noexcept |
WeakConstPointerTo< T > & | operator= (WeakConstPointerTo< T > &&from) noexcept |
template<class Y > | |
WeakConstPointerTo< T > & | operator= (WeakConstPointerTo< Y > &&r) noexcept |
WeakConstPointerTo< T > & | operator= (WeakPointerTo< T > &&from) noexcept |
template<class Y > | |
WeakConstPointerTo< T > & | operator= (WeakPointerTo< Y > &&r) noexcept |
const To * | p () const |
Returns an ordinary pointer instead of a WeakConstPointerTo. | |
![]() | |
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) |
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 86 of file weakPointerTo.h.
typedef WeakPointerToBase<T>::To WeakConstPointerTo< T >::To |
Definition at line 88 of file weakPointerTo.h.
|
inline |
Definition at line 233 of file weakPointerTo.I.
|
inline |
Definition at line 243 of file weakPointerTo.I.
|
inline |
Definition at line 253 of file weakPointerTo.I.
|
inline |
Definition at line 263 of file weakPointerTo.I.
|
inline |
Definition at line 273 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 283 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 293 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 304 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 315 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 326 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 337 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 348 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 359 of file weakPointerTo.I.
|
inline |
Definition at line 152 of file weakPointerTo.h.
|
inline |
Returns the original pointer value, even if the object has since been deleted.
Definition at line 432 of file weakPointerTo.I.
|
inline |
Definition at line 151 of file weakPointerTo.h.
|
inline |
A thread-safe way to access the underlying pointer; will silently return null if the underlying pointer was deleted or null.
Note that this may return null even if was_deleted() still returns false, which can occur if the object has reached reference count 0 and is about to be destroyed.
Definition at line 409 of file weakPointerTo.I.
|
inlineexplicit |
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 393 of file weakPointerTo.I.
|
inline |
Definition at line 369 of file weakPointerTo.I.
|
inline |
Definition at line 379 of file weakPointerTo.I.
|
inline |
Definition at line 461 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 545 of file weakPointerTo.I.
|
inline |
Definition at line 451 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 534 of file weakPointerTo.I.
|
inline |
Definition at line 441 of file weakPointerTo.I.
|
inline |
Definition at line 481 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 523 of file weakPointerTo.I.
|
inline |
Definition at line 471 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 512 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 501 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 567 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 491 of file weakPointerTo.I.
|
inlinenoexcept |
Definition at line 556 of file weakPointerTo.I.
|
inline |
Returns an ordinary pointer instead of a WeakConstPointerTo.
Useful to work around compiler problems, particularly for implicit upcasts.
Definition at line 421 of file weakPointerTo.I.