00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef PLIST_H
00016 #define PLIST_H
00017
00018 #include "dtoolbase.h"
00019 #include "pallocator.h"
00020 #include "register_type.h"
00021 #include <list>
00022
00023 #ifndef USE_STL_ALLOCATOR
00024
00025
00026 #define plist list
00027
00028 #else
00029
00030
00031
00032
00033
00034
00035
00036
00037 template<class Type>
00038 class plist : public list<Type, pallocator_single<Type> > {
00039 public:
00040 typedef pallocator_single<Type> allocator;
00041 typedef list<Type, allocator> base_class;
00042 typedef TYPENAME base_class::size_type size_type;
00043 plist(TypeHandle type_handle = plist_type_handle) : base_class(allocator(type_handle)) { }
00044 plist(const plist<Type> ©) : base_class(copy) { }
00045 plist(size_type n, TypeHandle type_handle = plist_type_handle) : base_class(n, Type(), allocator(type_handle)) { }
00046 plist(size_type n, const Type &value, TypeHandle type_handle = plist_type_handle) : base_class(n, value, allocator(type_handle)) { }
00047
00048 typedef TYPENAME base_class::iterator iterator;
00049 typedef TYPENAME base_class::const_iterator const_iterator;
00050 typedef TYPENAME base_class::reverse_iterator reverse_iterator;
00051 typedef TYPENAME base_class::const_reverse_iterator const_reverse_iterator;
00052 };
00053
00054 #endif // USE_STL_ALLOCATOR
00055 #endif