epoc32/include/stdapis/stlport/stl/wrappers/_hash_set.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/stlport/stl/wrappers/_hash_set.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/stlport/stl/wrappers/_hash_set.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,150 @@
     1.4 -_hash_set.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_SET_H
    1.25 +#define _STLP_INTERNAL_WRAP_HASH_SET_H
    1.26 +
    1.27 +#ifndef _STLP_INTERNAL_HASH_SET_H
    1.28 +# include <stl/_hash_set.h>
    1.29 +#endif
    1.30 +
    1.31 +# ifdef _STLP_USE_NAMESPACES
    1.32 +namespace STLPORT { 
    1.33 +# endif
    1.34 +
    1.35 +#  if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
    1.36 +#   define __HS_TEMPLATE_HEADER  template <class _Value>
    1.37 +#   define __HS_ARGUMENTS        _Value
    1.38 +#   define __HS_BASE_ARGUMENTS   _Value, hash<_Value>, equal_to<_Value>, _STLP_DEFAULT_ALLOCATOR(_Value)
    1.39 +#  else
    1.40 +#   define __HS_TEMPLATE_HEADER  template <class _Value, class _HashFcn, class _EqualKey >
    1.41 +#   define __HS_ARGUMENTS        _Value, _HashFcn, _EqualKey
    1.42 +#   define __HS_BASE_ARGUMENTS   _Value, _HashFcn, _EqualKey, _STLP_DEFAULT_ALLOCATOR(_Value)
    1.43 +#  endif
    1.44 +
    1.45 +
    1.46 +#  define __HS_SUPER  __hash_set< __HS_BASE_ARGUMENTS >
    1.47 +#  define __HMS_SUPER __hash_multiset< __HS_BASE_ARGUMENTS >
    1.48 +
    1.49 +
    1.50 +// provide a "default" hash_set adaptor
    1.51 +__HS_TEMPLATE_HEADER
    1.52 +class hash_set : public __HS_SUPER 
    1.53 +{
    1.54 +  typedef hash_set< __HS_ARGUMENTS > _Self;
    1.55 +public:
    1.56 +  typedef  __HS_SUPER _Super;
    1.57 +  __IMPORT_WITH_ITERATORS(_Super)
    1.58 +  typedef typename _Super::key_type key_type;
    1.59 +  typedef typename _Super::hasher hasher;
    1.60 +  typedef typename _Super::key_equal key_equal;
    1.61 +  hash_set() {}
    1.62 +  hash_set(size_type n) : __HS_SUPER(n) {}
    1.63 +  hash_set(size_type n, const hasher& hf) : __HS_SUPER(n, hf) {}
    1.64 +  hash_set(size_type n, const hasher& hf, const key_equal& eql): __HS_SUPER(n, hf, eql) {}
    1.65 +
    1.66 +  hash_set(const value_type* f, const value_type* l) : __HS_SUPER(f,l) {}
    1.67 +  hash_set(const value_type* f, const value_type* l, size_type n): __HS_SUPER(f,l,n) {}
    1.68 +  hash_set(const value_type* f, const value_type* l, size_type n,
    1.69 +           const hasher& hf) : __HS_SUPER(f,l,n,hf) {}
    1.70 +  hash_set(const value_type* f, const value_type* l, size_type n,
    1.71 +           const hasher& hf, const key_equal& eql) : __HS_SUPER(f,l,n,hf, eql) {}
    1.72 +
    1.73 +  hash_set(const_iterator f, const_iterator l) : __HS_SUPER(f,l) { }
    1.74 +  hash_set(const_iterator f, const_iterator l, size_type n) : __HS_SUPER(f,l,n) { }
    1.75 +  hash_set(const_iterator f, const_iterator l, size_type n,
    1.76 +           const hasher& hf) : __HS_SUPER(f, l, n, hf) { }
    1.77 +  hash_set(const_iterator f, const_iterator l, size_type n,
    1.78 +           const hasher& hf, const key_equal& eql) : __HS_SUPER(f, l, n, hf, eql) { }
    1.79 +# if defined (_STLP_BASE_MATCH_BUG)
    1.80 +    friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& hs1, const _Self& hs2);
    1.81 +# endif
    1.82 +};
    1.83 +
    1.84 +# if defined (_STLP_BASE_MATCH_BUG)
    1.85 +__HS_TEMPLATE_HEADER
    1.86 +inline bool operator==(const hash_set< __HS_ARGUMENTS >& hs1, 
    1.87 +                       const hash_set< __HS_ARGUMENTS >& hs2)
    1.88 +{
    1.89 +    typedef __HS_SUPER _Super;
    1.90 +    return (const _Super&)hs1 == (const _Super&)hs2; 
    1.91 +}
    1.92 +# endif
    1.93 +
    1.94 +// provide a "default" hash_multiset adaptor
    1.95 +__HS_TEMPLATE_HEADER
    1.96 +class hash_multiset : public __HMS_SUPER
    1.97 +{
    1.98 +  typedef hash_multiset< __HS_ARGUMENTS > _Self;
    1.99 +public:
   1.100 +  typedef __HMS_SUPER _Super;
   1.101 +  __IMPORT_WITH_ITERATORS(_Super)
   1.102 +  typedef typename _Super::key_type key_type;
   1.103 +  typedef typename _Super::hasher hasher;
   1.104 +  typedef typename _Super::key_equal key_equal;
   1.105 +
   1.106 +  hash_multiset() {}
   1.107 +  hash_multiset(size_type __n) : __HMS_SUPER(__n) {}
   1.108 +  hash_multiset(size_type __n, const hasher& __hf) : __HMS_SUPER(__n, __hf) {}
   1.109 +  hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql): __HMS_SUPER(__n, __hf, __eql) {}
   1.110 +
   1.111 +  hash_multiset(const value_type* __f, const value_type* __l) : __HMS_SUPER(__f,__l) {}
   1.112 +  hash_multiset(const value_type* __f, const value_type* __l, size_type __n): __HMS_SUPER(__f,__l,__n) {}
   1.113 +  hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
   1.114 +           const hasher& __hf) : __HMS_SUPER(__f,__l,__n,__hf) {}
   1.115 +  hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
   1.116 +           const hasher& __hf, const key_equal& __eql) : __HMS_SUPER(__f,__l,__n,__hf, __eql) {}
   1.117 +
   1.118 +  hash_multiset(const_iterator __f, const_iterator __l) : __HMS_SUPER(__f,__l) { }
   1.119 +  hash_multiset(const_iterator __f, const_iterator __l, size_type __n) : __HMS_SUPER(__f,__l,__n) { }
   1.120 +  hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
   1.121 +           const hasher& __hf) : __HMS_SUPER(__f, __l, __n, __hf) { }
   1.122 +  hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
   1.123 +           const hasher& __hf, const key_equal& __eql) : __HMS_SUPER(__f, __l, __n, __hf, __eql) { }
   1.124 +# if defined (_STLP_BASE_MATCH_BUG)
   1.125 +  friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hs1, const _Self& __hs2);
   1.126 +# endif
   1.127 +};
   1.128 +
   1.129 +# if defined (_STLP_BASE_MATCH_BUG)
   1.130 +__HS_TEMPLATE_HEADER
   1.131 +inline bool operator==(const hash_multiset< __HS_ARGUMENTS >& __hs1, 
   1.132 +                       const hash_multiset< __HS_ARGUMENTS >& __hs2)
   1.133 +{
   1.134 +    typedef __HMS_SUPER  __s;
   1.135 +    return _STLP_STD::operator==((const __s&)__hs1,(const __s&)__hs2);
   1.136 +}
   1.137 +# endif
   1.138 +
   1.139 +
   1.140 +# undef __HS_SUPER
   1.141 +# undef __HMS_SUPER
   1.142 +# undef __HS_ARGUMENTS
   1.143 +# undef __HS_BASE_ARGUMENTS
   1.144 +# undef __HS_TEMPLATE_HEADER
   1.145 +
   1.146 +# ifdef _STLP_USE_NAMESPACES
   1.147 +} /* namespace STLPORT */
   1.148 +# endif
   1.149 +
   1.150 +#endif /* _STLP_INTERNAL_HASH_SET_H */
   1.151 +
   1.152 +// Local Variables:
   1.153 +// mode:C++
   1.154 +// End: