1.1 --- a/epoc32/include/stdapis/stlport/stl/wrappers/_map.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/stlport/stl/wrappers/_map.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,150 @@
1.4 -_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_MAP_H
1.25 +#define _STLP_INTERNAL_WRAP_MAP_H
1.26 +
1.27 +#ifndef _STLP_INTERNAL_MAP_H
1.28 +# include <stl/_map.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 __MAP_TEMPLATE_HEADER template <class _Key, class _Tp>
1.37 +# define __MAP_ARGUMENTS _Key, _Tp
1.38 +# define __MMAP_TEMPLATE_HEADER template <class _Key, class _Tp>
1.39 +# define __MMAP_ARGUMENTS _Key, _Tp
1.40 +# define _Compare less<_Key>
1.41 +# else
1.42 +# define __MAP_TEMPLATE_HEADER template <class _Key, class _Tp, class _Compare >
1.43 +# define __MAP_ARGUMENTS _Key, _Tp, _Compare
1.44 +# define __MMAP_TEMPLATE_HEADER template <class _Key, class _Tp, class _Compare >
1.45 +# define __MMAP_ARGUMENTS _Key, _Tp, _Compare
1.46 +# endif
1.47 +
1.48 +
1.49 +# define __MAP_SUPER __map< _Key, _Tp, _Compare, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp) >
1.50 +# define __MMAP_SUPER __multimap< _Key, _Tp, _Compare, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp) >
1.51 +
1.52 +// provide a "default" map adaptor
1.53 +__MAP_TEMPLATE_HEADER
1.54 +class map : public __MAP_SUPER
1.55 +{
1.56 + typedef map< __MAP_ARGUMENTS > _Self;
1.57 +public:
1.58 + typedef __MAP_SUPER _Super;
1.59 + __IMPORT_WITH_REVERSE_ITERATORS(_Super)
1.60 + __IMPORT_SUPER_COPY_ASSIGNMENT(map, _Self, __MAP_SUPER)
1.61 + map() : __MAP_SUPER(_Compare()) {}
1.62 + explicit map(const _Compare& __comp) : __MAP_SUPER(__comp) {}
1.63 + map(const typename _Super::value_type* __first,
1.64 + const typename _Super::value_type* __last) :
1.65 + __MAP_SUPER(__first, __last, _Compare()) { }
1.66 + map(const typename _Super::value_type* __first,
1.67 + const typename _Super::value_type* __last,
1.68 + const _Compare& __comp) : __MAP_SUPER(__first, __last, __comp) { }
1.69 + map(typename _Super::const_iterator __first,
1.70 + typename _Super::const_iterator __last) :
1.71 + __MAP_SUPER(__first, __last, _Compare()) { }
1.72 + map(typename _Super::const_iterator __first,
1.73 + typename _Super::const_iterator __last,
1.74 + const _Compare& __comp) : __MAP_SUPER(__first, __last, __comp) { }
1.75 +};
1.76 +
1.77 +# if defined (_STLP_BASE_MATCH_BUG)
1.78 +__MAP_TEMPLATE_HEADER
1.79 +inline bool operator==(const map< __MAP_ARGUMENTS >& __x,
1.80 + const map< __MAP_ARGUMENTS >& __y) {
1.81 + typedef __MAP_SUPER _Super;
1.82 + return operator==((const _Super&)__x,(const _Super&)__y);
1.83 +}
1.84 +
1.85 +__MAP_TEMPLATE_HEADER
1.86 +inline bool operator<(const map< __MAP_ARGUMENTS >& __x,
1.87 + const map< __MAP_ARGUMENTS >& __y) {
1.88 + typedef __MAP_SUPER _Super;
1.89 + return operator < ((const _Super&)__x,(const _Super&)__y);
1.90 +}
1.91 +# endif /* _STLP_BASE_MATCH_BUG */
1.92 +
1.93 +
1.94 +// provide a "default" multimap adaptor
1.95 +__MMAP_TEMPLATE_HEADER
1.96 +class multimap : public __MMAP_SUPER
1.97 +{
1.98 + typedef multimap< __MMAP_ARGUMENTS > _Self;
1.99 +public:
1.100 + typedef __MMAP_SUPER _Super;
1.101 + __IMPORT_WITH_REVERSE_ITERATORS(_Super)
1.102 + // copy & assignment from super
1.103 + __IMPORT_SUPER_COPY_ASSIGNMENT(multimap, _Self, __MMAP_SUPER)
1.104 + multimap() : __MMAP_SUPER(_Compare()) {}
1.105 + explicit multimap(const _Compare& __comp) : __MMAP_SUPER(__comp) {}
1.106 + multimap(const typename _Super::value_type* __first,
1.107 + const typename _Super::value_type* __last) :
1.108 + __MMAP_SUPER(__first, __last, _Compare()) { }
1.109 + multimap(const typename _Super::value_type* __first,
1.110 + const typename _Super::value_type* __last,
1.111 + const _Compare& __comp) : __MMAP_SUPER(__first, __last, __comp) { }
1.112 + multimap(typename _Super::const_iterator __first,
1.113 + typename _Super::const_iterator __last) :
1.114 + __MMAP_SUPER(__first, __last, _Compare()) { }
1.115 + multimap(typename _Super::const_iterator __first,
1.116 + typename _Super::const_iterator __last,
1.117 + const _Compare& __comp) : __MMAP_SUPER(__first, __last, __comp) { }
1.118 +};
1.119 +
1.120 +# if defined (_STLP_BASE_MATCH_BUG)
1.121 +__MMAP_TEMPLATE_HEADER
1.122 +inline bool operator==(const multimap< __MMAP_ARGUMENTS >& __x,
1.123 + const multimap< __MMAP_ARGUMENTS >& __y) {
1.124 + typedef __MMAP_SUPER _Super;
1.125 + return (const _Super&)__x == (const _Super&)__y;
1.126 +}
1.127 +
1.128 +__MMAP_TEMPLATE_HEADER
1.129 +inline bool operator<(const multimap< __MMAP_ARGUMENTS >& __x,
1.130 + const multimap< __MMAP_ARGUMENTS >& __y) {
1.131 + typedef __MMAP_SUPER _Super;
1.132 + return (const _Super&)__x < (const _Super&)__y;
1.133 +}
1.134 +# endif
1.135 +
1.136 +# undef __MMAP_TEMPLATE_HEADER
1.137 +# undef __MMAP_ARGUMENTS
1.138 +# undef __MMAP_SUPER
1.139 +
1.140 +# undef __MAP_TEMPLATE_HEADER
1.141 +# undef __MAP_ARGUMENTS
1.142 +# undef __MAP_SUPER
1.143 +
1.144 +# undef _Compare
1.145 +
1.146 +# ifdef _STLP_USE_NAMESPACES
1.147 +} /* namespace STLPORT */
1.148 +# endif
1.149 +
1.150 +#endif /* _STLP_INTERNAL_WRAP_MAP_H */
1.151 +
1.152 +// Local Variables:
1.153 +// mode:C++
1.154 +// End: