Panda3D
|
This works exactly like PointerTo, except that the object is designed to be thread-safe: it is generally safe to make unprotected assignments to this pointer, in the sense that the last assignment will win and the reference counts will be properly maintained. More...
#include "threadSafePointerTo.h"
Public Types | |
typedef ThreadSafePointerToBase< T >::To | To |
![]() | |
typedef T | To |
Public Member Functions | |
ThreadSafePointerTo (const ThreadSafePointerTo< T > ©) | |
ThreadSafePointerTo (To *ptr=nullptr) | |
void | clear () |
bool | is_null () const |
operator T* () const | |
We also have the typecast operator to automatically convert ThreadSafePointerTo's to the required kind of actual pointer. More... | |
To & | operator* () const |
To * | operator-> () const |
ThreadSafePointerTo< T > & | operator= (const ThreadSafePointerTo< T > ©) |
ThreadSafePointerTo< T > & | operator= (To *ptr) |
To * | p () const |
Returns an ordinary pointer instead of a ThreadSafePointerTo. More... | |
![]() | |
void | clear () |
A convenient way to set the ThreadSafePointerTo object to NULL. More... | |
void | output (std::ostream &out) const |
A handy function to output ThreadSafePointerTo's as a hex pointer followed by a reference count. More... | |
![]() | |
size_t | get_hash () const |
constexpr 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 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. More... | |
![]() | |
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 works exactly like PointerTo, except that the object is designed to be thread-safe: it is generally safe to make unprotected assignments to this pointer, in the sense that the last assignment will win and the reference counts will be properly maintained.
Definition at line 27 of file threadSafePointerTo.h.
|
inline |
We also have the typecast operator to automatically convert ThreadSafePointerTo'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 65 of file threadSafePointerTo.I.
|
inline |
Returns an ordinary pointer instead of a ThreadSafePointerTo.
Useful to work around compiler problems, particularly for implicit upcasts.
Definition at line 75 of file threadSafePointerTo.I.