Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 1999, 2000
5 * This material is provided "as is", with absolutely no warranty expressed
6 * or implied. Any use is at your own risk.
8 * Permission to use or copy this software for any purpose is hereby granted
9 * without fee, provided the above notices are retained on all copies.
10 * Permission to modify the code and to distribute modified code is granted,
11 * provided the above notices are retained, and a notice that the code was
12 * modified is included with the above copyright notice.
16 /* NOTE: This is an internal header file, included by other STL headers.
17 * You should not attempt to use it directly.
20 #ifndef _STLP_INTERNAL_WRAP_HASH_MAP_H
21 #define _STLP_INTERNAL_WRAP_HASH_MAP_H
23 #ifndef _STLP_INTERNAL_HASH_MAP_H
24 # include <stl/_hash_map.h>
27 # ifdef _STLP_USE_NAMESPACES
31 // provide a "default" hash_map adaptor
32 # if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
33 # define __HM_TEMPLATE_HEADER template <class _Key, class _Tp>
34 # define __HM_ARGUMENTS _Key, _Tp
35 # define __HM_BASE_ARGUMENTS _Key, _Tp, hash<_Key>, equal_to<_Key>, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp)
37 # define __HM_TEMPLATE_HEADER template <class _Key, class _Tp, class _HashFcn, class _EqualKey >
38 # define __HM_ARGUMENTS _Key, _Tp, _HashFcn, _EqualKey
39 # define __HM_BASE_ARGUMENTS _Key, _Tp, _HashFcn, _EqualKey, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp)
43 # define __HM_SUPER __hash_map< __HM_BASE_ARGUMENTS >
44 # define __HMM_SUPER __hash_multimap< __HM_BASE_ARGUMENTS >
47 class hash_map : public __HM_SUPER
49 typedef hash_map< __HM_ARGUMENTS > _Self;
51 typedef __HM_SUPER _Super;
52 __IMPORT_WITH_ITERATORS(_Super)
53 typedef typename _Super::key_type key_type;
54 typedef typename _Super::hasher hasher;
55 typedef typename _Super::key_equal key_equal;
56 typedef _Tp data_type;
58 hash_map(size_type __n) : __HM_SUPER(__n) {}
59 hash_map(size_type __n, const hasher& __hf) : __HM_SUPER(__n, __hf) {}
60 hash_map(size_type __n, const hasher& __hf, const key_equal& __eql): __HM_SUPER(__n, __hf, __eql) {}
61 hash_map(const value_type* __f, const value_type* __l) : __HM_SUPER(__f,__l) {}
62 hash_map(const value_type* __f, const value_type* __l, size_type __n): __HM_SUPER(__f,__l,__n) {}
63 hash_map(const value_type* __f, const value_type* __l, size_type __n,
64 const hasher& __hf) : __HM_SUPER(__f,__l,__n,__hf) {}
65 hash_map(const value_type* __f, const value_type* __l, size_type __n,
66 const hasher& __hf, const key_equal& __eql) : __HM_SUPER(__f,__l,__n,__hf, __eql) {}
67 hash_map(const_iterator __f, const_iterator __l) : __HM_SUPER(__f,__l) { }
68 hash_map(const_iterator __f, const_iterator __l, size_type __n) : __HM_SUPER(__f,__l,__n) { }
69 hash_map(const_iterator __f, const_iterator __l, size_type __n,
70 const hasher& __hf) : __HM_SUPER(__f, __l, __n, __hf) { }
71 hash_map(const_iterator __f, const_iterator __l, size_type __n,
72 const hasher& __hf, const key_equal& __eql) : __HM_SUPER(__f, __l, __n, __hf, __eql) { }
73 # if defined (_STLP_BASE_MATCH_BUG)
74 friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hm1, const _Self& __hm2);
79 # if defined (_STLP_BASE_MATCH_BUG)
81 inline bool operator==(const hash_map< __HM_ARGUMENTS >& __hm1,
82 const hash_map< __HM_ARGUMENTS >& __hm2)
84 typedef __HM_SUPER _Super;
85 return (const _Super&)__hm1 == (const _Super&)__hm2;
89 // provide a "default" hash_multimap adaptor
91 class hash_multimap : public __HMM_SUPER
93 typedef hash_multimap< __HM_ARGUMENTS > _Self;
95 typedef __HMM_SUPER _Super;
96 __IMPORT_WITH_ITERATORS(_Super)
97 typedef typename _Super::key_type key_type;
98 typedef typename _Super::hasher hasher;
99 typedef typename _Super::key_equal key_equal;
100 typedef _Tp data_type;
102 hash_multimap(size_type __n) : __HMM_SUPER(__n) {}
103 hash_multimap(size_type __n, const hasher& __hf) : __HMM_SUPER(__n, __hf) {}
104 hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql): __HMM_SUPER(__n, __hf, __eql) {}
105 hash_multimap(const value_type* __f, const value_type* __l) : __HMM_SUPER(__f,__l) {}
106 hash_multimap(const value_type* __f, const value_type* __l, size_type __n): __HMM_SUPER(__f,__l,__n) {}
107 hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
108 const hasher& __hf) : __HMM_SUPER(__f,__l,__n,__hf) {}
109 hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
110 const hasher& __hf, const key_equal& __eql) : __HMM_SUPER(__f,__l,__n,__hf, __eql) {}
112 hash_multimap(const_iterator __f, const_iterator __l) : __HMM_SUPER(__f,__l) { }
113 hash_multimap(const_iterator __f, const_iterator __l, size_type __n) : __HMM_SUPER(__f,__l,__n) { }
114 hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
115 const hasher& __hf) : __HMM_SUPER(__f, __l, __n, __hf) { }
116 hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
117 const hasher& __hf, const key_equal& __eql) : __HMM_SUPER(__f, __l, __n, __hf, __eql) { }
118 # if defined (_STLP_BASE_MATCH_BUG)
119 friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hm1, const _Self& __hm2);
123 # if defined (_STLP_BASE_MATCH_BUG)
125 inline bool operator==(const hash_multimap< __HM_ARGUMENTS >& __hm1,
126 const hash_multimap< __HM_ARGUMENTS >& __hm2)
128 typedef __HMM_SUPER _Super;
129 return (const _Super&)__hm1 == (const _Super&)__hm2;
135 # undef __HM_TEMPLATE_HEADER
136 # undef __HM_ARGUMENTS
137 # undef __HM_BASE_ARGUMENTS
139 # ifdef _STLP_USE_NAMESPACES
140 } /* namespace STLPORT */
143 #endif /* _STLP_INTERNAL_HASH_SET_H */