1.1 --- a/epoc32/include/stdapis/stlport/stl/wrappers/_hash_map.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/stlport/stl/wrappers/_hash_map.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,147 @@
1.4 -_hash_map.h
1.5 +/*
1.6 + * Copyright (c) 1999, 2000
1.7 + * Boris Fomitchev
1.8 + *
1.9 + * This material is provided "as is", with absolutely no warranty expressed
1.10 + * or implied. Any use is at your own risk.
1.11 + *
1.12 + * Permission to use or copy this software for any purpose is hereby granted
1.13 + * without fee, provided the above notices are retained on all copies.
1.14 + * Permission to modify the code and to distribute modified code is granted,
1.15 + * provided the above notices are retained, and a notice that the code was
1.16 + * modified is included with the above copyright notice.
1.17 + *
1.18 + */
1.19 +
1.20 +/* NOTE: This is an internal header file, included by other STL headers.
1.21 + * You should not attempt to use it directly.
1.22 + */
1.23 +
1.24 +#ifndef _STLP_INTERNAL_WRAP_HASH_MAP_H
1.25 +#define _STLP_INTERNAL_WRAP_HASH_MAP_H
1.26 +
1.27 +#ifndef _STLP_INTERNAL_HASH_MAP_H
1.28 +# include <stl/_hash_map.h>
1.29 +#endif
1.30 +
1.31 +# ifdef _STLP_USE_NAMESPACES
1.32 +namespace STLPORT {
1.33 +# endif
1.34 +
1.35 +// provide a "default" hash_map adaptor
1.36 +# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
1.37 +# define __HM_TEMPLATE_HEADER template <class _Key, class _Tp>
1.38 +# define __HM_ARGUMENTS _Key, _Tp
1.39 +# define __HM_BASE_ARGUMENTS _Key, _Tp, hash<_Key>, equal_to<_Key>, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp)
1.40 +# else
1.41 +# define __HM_TEMPLATE_HEADER template <class _Key, class _Tp, class _HashFcn, class _EqualKey >
1.42 +# define __HM_ARGUMENTS _Key, _Tp, _HashFcn, _EqualKey
1.43 +# define __HM_BASE_ARGUMENTS _Key, _Tp, _HashFcn, _EqualKey, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp)
1.44 +# endif
1.45 +
1.46 +
1.47 +# define __HM_SUPER __hash_map< __HM_BASE_ARGUMENTS >
1.48 +# define __HMM_SUPER __hash_multimap< __HM_BASE_ARGUMENTS >
1.49 +
1.50 +__HM_TEMPLATE_HEADER
1.51 +class hash_map : public __HM_SUPER
1.52 +{
1.53 + typedef hash_map< __HM_ARGUMENTS > _Self;
1.54 +public:
1.55 + typedef __HM_SUPER _Super;
1.56 + __IMPORT_WITH_ITERATORS(_Super)
1.57 + typedef typename _Super::key_type key_type;
1.58 + typedef typename _Super::hasher hasher;
1.59 + typedef typename _Super::key_equal key_equal;
1.60 + typedef _Tp data_type;
1.61 + hash_map() {}
1.62 + hash_map(size_type __n) : __HM_SUPER(__n) {}
1.63 + hash_map(size_type __n, const hasher& __hf) : __HM_SUPER(__n, __hf) {}
1.64 + hash_map(size_type __n, const hasher& __hf, const key_equal& __eql): __HM_SUPER(__n, __hf, __eql) {}
1.65 + hash_map(const value_type* __f, const value_type* __l) : __HM_SUPER(__f,__l) {}
1.66 + hash_map(const value_type* __f, const value_type* __l, size_type __n): __HM_SUPER(__f,__l,__n) {}
1.67 + hash_map(const value_type* __f, const value_type* __l, size_type __n,
1.68 + const hasher& __hf) : __HM_SUPER(__f,__l,__n,__hf) {}
1.69 + hash_map(const value_type* __f, const value_type* __l, size_type __n,
1.70 + const hasher& __hf, const key_equal& __eql) : __HM_SUPER(__f,__l,__n,__hf, __eql) {}
1.71 + hash_map(const_iterator __f, const_iterator __l) : __HM_SUPER(__f,__l) { }
1.72 + hash_map(const_iterator __f, const_iterator __l, size_type __n) : __HM_SUPER(__f,__l,__n) { }
1.73 + hash_map(const_iterator __f, const_iterator __l, size_type __n,
1.74 + const hasher& __hf) : __HM_SUPER(__f, __l, __n, __hf) { }
1.75 + hash_map(const_iterator __f, const_iterator __l, size_type __n,
1.76 + const hasher& __hf, const key_equal& __eql) : __HM_SUPER(__f, __l, __n, __hf, __eql) { }
1.77 +# if defined (_STLP_BASE_MATCH_BUG)
1.78 + friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hm1, const _Self& __hm2);
1.79 +# endif
1.80 +};
1.81 +
1.82 +
1.83 +# if defined (_STLP_BASE_MATCH_BUG)
1.84 +__HM_TEMPLATE_HEADER
1.85 +inline bool operator==(const hash_map< __HM_ARGUMENTS >& __hm1,
1.86 + const hash_map< __HM_ARGUMENTS >& __hm2)
1.87 +{
1.88 + typedef __HM_SUPER _Super;
1.89 + return (const _Super&)__hm1 == (const _Super&)__hm2;
1.90 +}
1.91 +# endif
1.92 +
1.93 +// provide a "default" hash_multimap adaptor
1.94 +__HM_TEMPLATE_HEADER
1.95 +class hash_multimap : public __HMM_SUPER
1.96 +{
1.97 + typedef hash_multimap< __HM_ARGUMENTS > _Self;
1.98 +public:
1.99 + typedef __HMM_SUPER _Super;
1.100 + __IMPORT_WITH_ITERATORS(_Super)
1.101 + typedef typename _Super::key_type key_type;
1.102 + typedef typename _Super::hasher hasher;
1.103 + typedef typename _Super::key_equal key_equal;
1.104 + typedef _Tp data_type;
1.105 + hash_multimap() {}
1.106 + hash_multimap(size_type __n) : __HMM_SUPER(__n) {}
1.107 + hash_multimap(size_type __n, const hasher& __hf) : __HMM_SUPER(__n, __hf) {}
1.108 + hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql): __HMM_SUPER(__n, __hf, __eql) {}
1.109 + hash_multimap(const value_type* __f, const value_type* __l) : __HMM_SUPER(__f,__l) {}
1.110 + hash_multimap(const value_type* __f, const value_type* __l, size_type __n): __HMM_SUPER(__f,__l,__n) {}
1.111 + hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
1.112 + const hasher& __hf) : __HMM_SUPER(__f,__l,__n,__hf) {}
1.113 + hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
1.114 + const hasher& __hf, const key_equal& __eql) : __HMM_SUPER(__f,__l,__n,__hf, __eql) {}
1.115 +
1.116 + hash_multimap(const_iterator __f, const_iterator __l) : __HMM_SUPER(__f,__l) { }
1.117 + hash_multimap(const_iterator __f, const_iterator __l, size_type __n) : __HMM_SUPER(__f,__l,__n) { }
1.118 + hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
1.119 + const hasher& __hf) : __HMM_SUPER(__f, __l, __n, __hf) { }
1.120 + hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
1.121 + const hasher& __hf, const key_equal& __eql) : __HMM_SUPER(__f, __l, __n, __hf, __eql) { }
1.122 +# if defined (_STLP_BASE_MATCH_BUG)
1.123 + friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hm1, const _Self& __hm2);
1.124 +# endif
1.125 +};
1.126 +
1.127 +# if defined (_STLP_BASE_MATCH_BUG)
1.128 +__HM_TEMPLATE_HEADER
1.129 +inline bool operator==(const hash_multimap< __HM_ARGUMENTS >& __hm1,
1.130 + const hash_multimap< __HM_ARGUMENTS >& __hm2)
1.131 +{
1.132 + typedef __HMM_SUPER _Super;
1.133 + return (const _Super&)__hm1 == (const _Super&)__hm2;
1.134 +}
1.135 +# endif
1.136 +
1.137 +# undef __HM_SUPER
1.138 +# undef __HMM_SUPER
1.139 +# undef __HM_TEMPLATE_HEADER
1.140 +# undef __HM_ARGUMENTS
1.141 +# undef __HM_BASE_ARGUMENTS
1.142 +
1.143 +# ifdef _STLP_USE_NAMESPACES
1.144 +} /* namespace STLPORT */
1.145 +# endif
1.146 +
1.147 +#endif /* _STLP_INTERNAL_HASH_SET_H */
1.148 +
1.149 +// Local Variables:
1.150 +// mode:C++
1.151 +// End: