Panda3D
|
A NodeConstPointerTo is similar to a NodePointerTo, except it keeps a const pointer to the thing. More...
#include "nodePointerTo.h"
Public Types | |
typedef NodePointerToBase< T >::To | To |
Public Member Functions | |
NodeConstPointerTo (const To *ptr=(const To *) NULL) | |
NodeConstPointerTo (const NodePointerTo< T > ©) | |
NodeConstPointerTo (const NodeConstPointerTo< T > ©) | |
void | clear () |
A convenient way to set the NodePointerTo object to NULL. | |
size_t | get_hash () const |
bool | is_null () const |
Returns true if the PointerTo is a NULL pointer, false otherwise. | |
operator const T * () const | |
We also have the typecast operator to automatically convert NodeConstPointerTo's to the required kind of actual pointer. | |
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 *ptr) |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
bool | operator!= (const PointerToVoid &other) const |
const To & | operator* () const |
const To * | operator-> () const |
bool | operator< (const void *other) const |
bool | operator< (const PointerToVoid &other) const |
NodeConstPointerTo< T > & | operator= (const To *ptr) |
NodeConstPointerTo< T > & | operator= (const NodePointerTo< T > ©) |
NodeConstPointerTo< T > & | operator= (const NodeConstPointerTo< T > ©) |
bool | operator== (const PointerToVoid &other) const |
void | output (ostream &out) const |
A handy function to output NodePointerTo's as a hex pointer followed by a reference count. | |
const To * | p () const |
Returns an ordinary pointer instead of a NodeConstPointerTo. | |
Protected Member Functions | |
void | reassign (To *ptr) |
This is the main work of the NodePointerTo family. | |
void | reassign (const NodePointerToBase< To > ©) |
Protected Attributes | |
void * | _void_ptr |
A NodeConstPointerTo is similar to a NodePointerTo, except it keeps a const pointer to the thing.
Definition at line 59 of file nodePointerTo.h.
void NodePointerToBase< T >::clear | ( | ) | [inline, inherited] |
A convenient way to set the NodePointerTo object to NULL.
(Assignment to a NULL pointer also works, of course.)
Definition at line 113 of file nodePointerToBase.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().
NodeConstPointerTo< T >::operator const T * | ( | ) | const [inline] |
We also have the typecast operator to automatically convert NodeConstPointerTo'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 235 of file nodePointerTo.I.
void NodePointerToBase< T >::output | ( | ostream & | out | ) | const [inline, inherited] |
A handy function to output NodePointerTo's as a hex pointer followed by a reference count.
Definition at line 125 of file nodePointerToBase.I.
const NodeConstPointerTo< T >::To * NodeConstPointerTo< T >::p | ( | ) | const [inline] |
Returns an ordinary pointer instead of a NodeConstPointerTo.
Useful to work around compiler problems, particularly for implicit upcasts.
Definition at line 250 of file nodePointerTo.I.
void NodePointerToBase< T >::reassign | ( | To * | ptr | ) | [protected, inherited] |
This is the main work of the NodePointerTo family.
When the pointer is reassigned, decrement the old reference count and increment the new one.
Definition at line 58 of file nodePointerToBase.I.
References TypeHandle::none().