20 #include "dtoolbase.h" 21 #include "pallocator.h" 22 #include "register_type.h" 24 #ifndef USE_STL_ALLOCATOR 27 #define pvector vector 39 class pvector :
public vector<Type, pallocator_array<Type> > {
42 typedef vector<Type, allocator> base_class;
43 typedef TYPENAME base_class::size_type size_type;
45 pvector(
TypeHandle type_handle = pvector_type_handle) : base_class(allocator(type_handle)) { }
47 pvector(size_type n,
TypeHandle type_handle = pvector_type_handle) : base_class(n, Type(), allocator(type_handle)) { }
48 pvector(size_type n,
const Type &value,
TypeHandle type_handle = pvector_type_handle) : base_class(n, value, allocator(type_handle)) { }
49 pvector(
const Type *begin,
const Type *end,
TypeHandle type_handle = pvector_type_handle) : base_class(begin, end, allocator(type_handle)) { }
52 #endif // USE_STL_ALLOCATOR
This is our own Panda specialization on the default STL vector.
TypeHandle is the identifier used to differentiate C++ class types.