Panda3D
|
This is a list of WeakPointerTo's that share a reference to a given ReferenceCount object. More...
#include "weakReferenceList.h"
Public Member Functions | |
~WeakReferenceList () | |
The destructor tells all of the owned references that we're gone. | |
void | add_reference (WeakPointerToVoid *ptv) |
Intended to be called only by WeakPointerTo (or by any class implementing a weak reference-counting pointer), this adds the indicated PointerToVoid structure to the list of such structures that are maintaining a weak pointer to this object. | |
void | clear_reference (WeakPointerToVoid *ptv) |
Intended to be called only by WeakPointerTo (or by any class implementing a weak reference-counting pointer), this removes the indicated PointerToVoid structure from the list of such structures that are maintaining a weak pointer to this object. |
This is a list of WeakPointerTo's that share a reference to a given ReferenceCount object.
It is stored in a separate class since it is assumed that most ReferenceCount objects do not need to store this list at all; this avoids bloating every ReferenceCount object in the world with the size of this object.
Definition at line 34 of file weakReferenceList.h.
WeakReferenceList::~WeakReferenceList | ( | ) |
The destructor tells all of the owned references that we're gone.
Definition at line 35 of file weakReferenceList.cxx.
void WeakReferenceList::add_reference | ( | WeakPointerToVoid * | ptv | ) |
Intended to be called only by WeakPointerTo (or by any class implementing a weak reference-counting pointer), this adds the indicated PointerToVoid structure to the list of such structures that are maintaining a weak pointer to this object.
When the WeakReferenceList destructs (presumably because its owning object destructs), the pointer within the PointerToVoid object will be set to NULL.
Definition at line 58 of file weakReferenceList.cxx.
Referenced by ReferenceCount::weak_ref().
void WeakReferenceList::clear_reference | ( | WeakPointerToVoid * | ptv | ) |
Intended to be called only by WeakPointerTo (or by any class implementing a weak reference-counting pointer), this removes the indicated PointerToVoid structure from the list of such structures that are maintaining a weak pointer to this object.
Definition at line 75 of file weakReferenceList.cxx.