Panda3D
|
This is the base class for ThreadSafePointerTo and ThreadSafeConstPointerTo. More...
#include "threadSafePointerToBase.h"
Public Types | |
typedef T | To |
Public Member Functions | |
void | clear () |
A convenient way to set the ThreadSafePointerTo object to NULL. | |
size_t | get_hash () const |
bool | is_null () const |
Returns true if the PointerTo is a NULL pointer, false otherwise. | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
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 *ptr) |
void * | operator new[] (size_t size) |
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 | output (ostream &out) const |
A handy function to output ThreadSafePointerTo's as a hex pointer followed by a reference count. | |
Protected Member Functions | |
ThreadSafePointerToBase (To *ptr) | |
ThreadSafePointerToBase (const ThreadSafePointerToBase< T > ©) | |
void | reassign (To *ptr) |
This is the main work of the ThreadSafePointerTo family. | |
void | reassign (const ThreadSafePointerToBase< To > ©) |
Protected Attributes | |
void * | _void_ptr |
This is the base class for ThreadSafePointerTo and ThreadSafeConstPointerTo.
Don't try to use it directly; use either derived class instead.
Definition at line 33 of file threadSafePointerToBase.h.
void ThreadSafePointerToBase< T >::clear | ( | ) | [inline] |
A convenient way to set the ThreadSafePointerTo object to NULL.
(Assignment to a NULL pointer also works, of course.)
Reimplemented in ThreadSafePointerTo< T >, and ThreadSafeConstPointerTo< T >.
Definition at line 136 of file threadSafePointerToBase.I.
bool PointerToVoid::is_null | ( | ) | const [inline, inherited] |
Returns true if the PointerTo is a NULL pointer, false otherwise.
(Direct comparison to a NULL pointer also works.)
Reimplemented in PointerTo< T >, ThreadSafePointerTo< T >, and WeakConstPointerTo< T >.
Definition at line 54 of file pointerToVoid.I.
Referenced by TexturePeeker::is_valid().
void ThreadSafePointerToBase< T >::output | ( | ostream & | out | ) | const [inline] |
A handy function to output ThreadSafePointerTo's as a hex pointer followed by a reference count.
Definition at line 148 of file threadSafePointerToBase.I.
void ThreadSafePointerToBase< T >::reassign | ( | To * | ptr | ) | [inline, protected] |
This is the main work of the ThreadSafePointerTo family.
When the pointer is reassigned, decrement the old reference count and increment the new one.
Definition at line 58 of file threadSafePointerToBase.I.