Panda3D
Public Types | Public Member Functions

ReferenceCountedVector< Element > Class Template Reference

This defines the object that is actually stored and reference-counted internally by a PointerToArray. More...

#include "pointerToArrayBase.h"

Inheritance diagram for ReferenceCountedVector< Element >:
NodeReferenceCount ReferenceCount MemoryBase

List of all members.

Public Types

typedef pvector< Element >
::iterator 
iterator
typedef pvector< Element >
::size_type 
size_type

Public Member Functions

 ReferenceCountedVector (TypeHandle type_handle)
 ReferenceCountedVector (const ReferenceCountedVector< Element > &copy)
 ReferenceCountedVector (size_type initial_size, TypeHandle type_handle)
void clear ()
void erase (iterator position)
void erase (iterator first, iterator last)
void insert (iterator position, size_type n, const Element &x)
iterator insert (iterator position, const Element &x)
void pop_back ()
size_type size () const

Detailed Description

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 43 of file pointerToArrayBase.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations