00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef PMAP_H
00020 #define PMAP_H
00021
00022 #include "dtoolbase.h"
00023 #include "pallocator.h"
00024
00025 #include <map>
00026
00027 #ifdef NO_STYLE_ALLOCATOR
00028
00029
00030 #define pmap map
00031 #define pmultimap multimap
00032 #else
00033
00034
00035
00036
00037
00038
00039
00040
00041 template<class Key, class Value, class Compare = less<Key> >
00042 class pmap : public map<Key, Value, Compare, pallocator<Value> > {
00043 public:
00044 pmap() : map<Key, Value, Compare, pallocator<Value> >() { }
00045 pmap(const pmap<Key, Value, Compare> ©) : map<Key, Value, Compare, pallocator<Value> >(copy) { }
00046 pmap(const Compare &comp) : map<Key, Value, Compare, pallocator<Value> >(comp) { }
00047 };
00048
00049
00050
00051
00052
00053
00054
00055
00056 template<class Key, class Value, class Compare = less<Key> >
00057 class pmultimap : public multimap<Key, Value, Compare, pallocator<Value> > {
00058 public:
00059 pmultimap() : multimap<Key, Value, Compare, pallocator<Value> >() { }
00060 pmultimap(const pmultimap<Key, Value, Compare> ©) : multimap<Key, Value, Compare, pallocator<Value> >(copy) { }
00061 pmultimap(const Compare &comp) : multimap<Key, Value, Compare, pallocator<Value> >(comp) { }
00062 };
00063
00064 #endif // NO_STYLE_ALLOCATOR
00065 #endif