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 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. | |
void | refresh () const |
Informs the WeakPointerTo object that its pointer is no longer deleted. | |
Protected Member Functions | |
WeakPointerToBase (To *ptr) | |
WeakPointerToBase (const PointerToBase< T > ©) | |
WeakPointerToBase (const WeakPointerToBase< T > ©) | |
void | reassign (To *ptr) |
This is the main work of the PointerTo family. | |
void | reassign (const PointerToBase< To > ©) |
void | reassign (const WeakPointerToBase< To > ©) |
This is the base class for PointerTo and ConstPointerTo.
Don't try to use it directly; use either derived class instead.
Definition at line 29 of file weakPointerToBase.h.
void WeakPointerToBase< T >::clear | ( | ) | [inline] |
A convenient way to set the PointerTo object to NULL.
(Assignment to a NULL pointer also works, of course.)
Reimplemented in WeakConstPointerTo< T >, and WeakPointerTo< T >.
Definition at line 394 of file weakPointerToBase.I.
void WeakPointerToBase< T >::output | ( | ostream & | out | ) | const [inline] |
A handy function to output PointerTo's as a hex pointer followed by a reference count.
Definition at line 424 of file weakPointerToBase.I.
void WeakPointerToBase< T >::reassign | ( | To * | ptr | ) | [protected] |
This is the main work of the PointerTo family.
When the pointer is reassigned, decrement the old reference count and increment the new one.
Definition at line 69 of file weakPointerToBase.I.
References TypeHandle::none().
void WeakPointerToBase< T >::refresh | ( | ) | const [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 412 of file weakPointerToBase.I.