Panda3D
|
This defines the object that is actually stored and reference-counted internally by a PointerToArray. More...
#include "pointerToArrayBase.h"
Public Types | |
typedef pvector< Element >::iterator | iterator |
typedef pvector< Element >::size_type | size_type |
![]() | |
typedef pallocator_array< Element > | allocator |
typedef vector< Element, allocator > | base_class |
typedef base_class::size_type | size_type |
Public Member Functions | |
ReferenceCountedVector (TypeHandle type_handle) | |
ReferenceCountedVector (const ReferenceCountedVector< Element > ©) | |
ReferenceCountedVector (size_type initial_size, TypeHandle type_handle) | |
void | clear () |
void | erase (iterator position) |
void | erase (iterator first, iterator last) |
iterator | insert (iterator position, const Element &x) |
void | insert (iterator position, size_type n, const Element &x) |
void | pop_back () |
size_type | size () const |
![]() | |
int | get_node_ref_count () const |
Returns the current reference count. More... | |
void | node_ref () const |
Explicitly increments the node reference count and the normal reference count simultaneously. More... | |
bool | node_unref () const |
Explicitly decrements the node reference count and the normal reference count simultaneously. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
![]() | |
pvector (TypeHandle type_handle=pvector_type_handle) | |
pvector (const pvector< Element > ©) | |
pvector (size_type n, TypeHandle type_handle=pvector_type_handle) | |
pvector (size_type n, const Element &value, TypeHandle type_handle=pvector_type_handle) | |
pvector (const Element *begin, const Element *end, TypeHandle type_handle=pvector_type_handle) | |
Additional Inherited Members | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This defines the object that is actually stored and reference-counted internally by a PointerToArray.
It is basically a NodeReferenceCount-capable STL vector.
We use NodeReferenceCount (instead of just ReferenceCount), which adds node_ref() and node_unref() to the standard ref() and unref(). This is particularly useful for GeomVertexArrayData; other classes may or may not find this additional counter useful, but since it adds relatively little overhead (compared with what is presumably a largish array), we go ahead and add it here, even though it is inherited by many different parts of the system that may not use it.
Definition at line 43 of file pointerToArrayBase.h.