This defines the object that is actually stored and reference-counted internally by a PointerToArray.
More...
|
| ReferenceCountedVector (const Element *begin, const Element *end, TypeHandle type_handle) |
| Creates an array with all elements from begin up to but not including end.
|
|
| ReferenceCountedVector (pvector< Element > &&from) |
| Creates an array that takes its elements from the given vector.
|
|
| ReferenceCountedVector (size_type initial_size, TypeHandle type_handle) |
|
| ReferenceCountedVector (TypeHandle type_handle) |
|
void | clear () |
|
void | erase (iterator first, iterator last) |
|
void | erase (iterator position) |
|
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.
|
|
void | node_ref () const |
| Explicitly increments the node reference count and the normal reference count simultaneously.
|
|
bool | node_unref () const |
| Explicitly decrements the node reference count and the normal reference count simultaneously.
|
|
void | node_unref_only () const |
| Decrements the node reference count without affecting the normal reference count.
|
|
bool | test_ref_count_integrity () const |
| Does some easy checks to make sure that the reference count isn't completely bogus.
|
|
int | get_ref_count () const |
|
WeakReferenceList * | get_weak_list () const |
| Returns the WeakReferenceList associated with this ReferenceCount object.
|
|
bool | has_weak_list () const |
| Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
|
|
void | local_object () |
| This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
|
|
void | ref () const |
| Explicitly increments the reference count.
|
|
bool | ref_if_nonzero () const |
| Atomically increases the reference count of this object if it is not zero.
|
|
bool | test_ref_count_integrity () const |
| Does some easy checks to make sure that the reference count isn't completely bogus.
|
|
bool | test_ref_count_nonzero () const |
| Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
|
|
virtual bool | unref () const |
| Explicitly decrements the reference count.
|
|
bool | unref_if_one () const |
| Atomically decreases the reference count of this object if it is one.
|
|
WeakReferenceList * | weak_ref () |
| Adds the indicated PointerToVoid as a weak reference to this object.
|
|
void | weak_unref () |
| Removes the indicated PointerToVoid as a weak reference to this object.
|
|
void | operator delete (void *, void *) |
|
void | operator delete (void *ptr) |
|
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 * | operator new[] (size_t size, void *ptr) |
|
| pvector (const Element *begin, const Element *end, TypeHandle type_handle=pvector_type_handle) |
|
| pvector (const pvector< Element > ©) |
|
| pvector (pvector< Element > &&from) noexcept |
|
| pvector (size_type n, const Element &value, TypeHandle type_handle=pvector_type_handle) |
|
| pvector (size_type n, TypeHandle type_handle=pvector_type_handle) |
|
| pvector (TypeHandle type_handle=pvector_type_handle) |
|
pvector< Element > & | operator= (const pvector< Element > ©) |
|
pvector< Element > & | operator= (pvector< Element > &&from) noexcept |
|
template<class Element>
class ReferenceCountedVector< Element >
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 38 of file pointerToArrayBase.h.