This commit is contained in:
romkazvo
2023-08-07 19:29:24 +08:00
commit 34d6c5d489
4832 changed files with 1389451 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Copyright (c) 1997
* Moscow Center for SPARC Technology
*
* Copyright (c) 1999
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
#ifndef _STLP_INTERNAL_DEQUE_H
# include <stl/_deque.h>
#endif
# if defined (_STLP_DEBUG)
# define _DEQUE_SUPER_NAME _DBG_deque
# else
# define _DEQUE_SUPER_NAME __deque__
# endif
# define _DEQUE_SUPER _DEQUE_SUPER_NAME<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
_STLP_BEGIN_NAMESPACE
// provide a "default" deque adaptor
template <class _Tp>
class deque : public _DEQUE_SUPER {
public:
typedef deque<_Tp> _Self;
typedef _DEQUE_SUPER _Super;
__IMPORT_WITH_REVERSE_ITERATORS(_Super)
__IMPORT_SUPER_COPY_ASSIGNMENT(deque, _Self, _DEQUE_SUPER)
deque() : _DEQUE_SUPER() { }
deque(size_type __n, const _Tp& __value) : _DEQUE_SUPER(__n, __value) { }
explicit deque(size_type __n) : _DEQUE_SUPER(__n) { }
deque(const _Tp* __first, const _Tp* __last) : _DEQUE_SUPER(__first, __last) { }
deque(const_iterator __first, const_iterator __last) : _DEQUE_SUPER(__first, __last) { }
~deque() { }
};
# if defined (_STLP_BASE_MATCH_BUG)
template <class _Tp>
inline bool
operator==(const deque<_Tp>& __x, const deque<_Tp>& __y) {
return __x.size() == __y.size() && equal(__x.begin(), __x.end(), __y.begin());
}
template <class _Tp>
inline bool
operator<(const deque<_Tp>& __x, const deque<_Tp>& __y) {
return lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
}
# endif /* BASE_MATCH_BUG */
# undef _DEQUE_SUPER
_STLP_END_NAMESPACE
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,147 @@
/*
* Copyright (c) 1999, 2000
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef _STLP_INTERNAL_WRAP_HASH_MAP_H
#define _STLP_INTERNAL_WRAP_HASH_MAP_H
#ifndef _STLP_INTERNAL_HASH_MAP_H
# include <stl/_hash_map.h>
#endif
# ifdef _STLP_USE_NAMESPACES
namespace STLPORT {
# endif
// provide a "default" hash_map adaptor
# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
# define __HM_TEMPLATE_HEADER template <class _Key, class _Tp>
# define __HM_ARGUMENTS _Key, _Tp
# define __HM_BASE_ARGUMENTS _Key, _Tp, hash<_Key>, equal_to<_Key>, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp)
# else
# define __HM_TEMPLATE_HEADER template <class _Key, class _Tp, class _HashFcn, class _EqualKey >
# define __HM_ARGUMENTS _Key, _Tp, _HashFcn, _EqualKey
# define __HM_BASE_ARGUMENTS _Key, _Tp, _HashFcn, _EqualKey, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp)
# endif
# define __HM_SUPER __hash_map< __HM_BASE_ARGUMENTS >
# define __HMM_SUPER __hash_multimap< __HM_BASE_ARGUMENTS >
__HM_TEMPLATE_HEADER
class hash_map : public __HM_SUPER
{
typedef hash_map< __HM_ARGUMENTS > _Self;
public:
typedef __HM_SUPER _Super;
__IMPORT_WITH_ITERATORS(_Super)
typedef typename _Super::key_type key_type;
typedef typename _Super::hasher hasher;
typedef typename _Super::key_equal key_equal;
typedef _Tp data_type;
hash_map() {}
hash_map(size_type __n) : __HM_SUPER(__n) {}
hash_map(size_type __n, const hasher& __hf) : __HM_SUPER(__n, __hf) {}
hash_map(size_type __n, const hasher& __hf, const key_equal& __eql): __HM_SUPER(__n, __hf, __eql) {}
hash_map(const value_type* __f, const value_type* __l) : __HM_SUPER(__f,__l) {}
hash_map(const value_type* __f, const value_type* __l, size_type __n): __HM_SUPER(__f,__l,__n) {}
hash_map(const value_type* __f, const value_type* __l, size_type __n,
const hasher& __hf) : __HM_SUPER(__f,__l,__n,__hf) {}
hash_map(const value_type* __f, const value_type* __l, size_type __n,
const hasher& __hf, const key_equal& __eql) : __HM_SUPER(__f,__l,__n,__hf, __eql) {}
hash_map(const_iterator __f, const_iterator __l) : __HM_SUPER(__f,__l) { }
hash_map(const_iterator __f, const_iterator __l, size_type __n) : __HM_SUPER(__f,__l,__n) { }
hash_map(const_iterator __f, const_iterator __l, size_type __n,
const hasher& __hf) : __HM_SUPER(__f, __l, __n, __hf) { }
hash_map(const_iterator __f, const_iterator __l, size_type __n,
const hasher& __hf, const key_equal& __eql) : __HM_SUPER(__f, __l, __n, __hf, __eql) { }
# if defined (_STLP_BASE_MATCH_BUG)
friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hm1, const _Self& __hm2);
# endif
};
# if defined (_STLP_BASE_MATCH_BUG)
__HM_TEMPLATE_HEADER
inline bool operator==(const hash_map< __HM_ARGUMENTS >& __hm1,
const hash_map< __HM_ARGUMENTS >& __hm2)
{
typedef __HM_SUPER _Super;
return (const _Super&)__hm1 == (const _Super&)__hm2;
}
# endif
// provide a "default" hash_multimap adaptor
__HM_TEMPLATE_HEADER
class hash_multimap : public __HMM_SUPER
{
typedef hash_multimap< __HM_ARGUMENTS > _Self;
public:
typedef __HMM_SUPER _Super;
__IMPORT_WITH_ITERATORS(_Super)
typedef typename _Super::key_type key_type;
typedef typename _Super::hasher hasher;
typedef typename _Super::key_equal key_equal;
typedef _Tp data_type;
hash_multimap() {}
hash_multimap(size_type __n) : __HMM_SUPER(__n) {}
hash_multimap(size_type __n, const hasher& __hf) : __HMM_SUPER(__n, __hf) {}
hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql): __HMM_SUPER(__n, __hf, __eql) {}
hash_multimap(const value_type* __f, const value_type* __l) : __HMM_SUPER(__f,__l) {}
hash_multimap(const value_type* __f, const value_type* __l, size_type __n): __HMM_SUPER(__f,__l,__n) {}
hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
const hasher& __hf) : __HMM_SUPER(__f,__l,__n,__hf) {}
hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
const hasher& __hf, const key_equal& __eql) : __HMM_SUPER(__f,__l,__n,__hf, __eql) {}
hash_multimap(const_iterator __f, const_iterator __l) : __HMM_SUPER(__f,__l) { }
hash_multimap(const_iterator __f, const_iterator __l, size_type __n) : __HMM_SUPER(__f,__l,__n) { }
hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
const hasher& __hf) : __HMM_SUPER(__f, __l, __n, __hf) { }
hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
const hasher& __hf, const key_equal& __eql) : __HMM_SUPER(__f, __l, __n, __hf, __eql) { }
# if defined (_STLP_BASE_MATCH_BUG)
friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hm1, const _Self& __hm2);
# endif
};
# if defined (_STLP_BASE_MATCH_BUG)
__HM_TEMPLATE_HEADER
inline bool operator==(const hash_multimap< __HM_ARGUMENTS >& __hm1,
const hash_multimap< __HM_ARGUMENTS >& __hm2)
{
typedef __HMM_SUPER _Super;
return (const _Super&)__hm1 == (const _Super&)__hm2;
}
# endif
# undef __HM_SUPER
# undef __HMM_SUPER
# undef __HM_TEMPLATE_HEADER
# undef __HM_ARGUMENTS
# undef __HM_BASE_ARGUMENTS
# ifdef _STLP_USE_NAMESPACES
} /* namespace STLPORT */
# endif
#endif /* _STLP_INTERNAL_HASH_SET_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,150 @@
/*
* Copyright (c) 1999, 2000
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef _STLP_INTERNAL_WRAP_HASH_SET_H
#define _STLP_INTERNAL_WRAP_HASH_SET_H
#ifndef _STLP_INTERNAL_HASH_SET_H
# include <stl/_hash_set.h>
#endif
# ifdef _STLP_USE_NAMESPACES
namespace STLPORT {
# endif
# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
# define __HS_TEMPLATE_HEADER template <class _Value>
# define __HS_ARGUMENTS _Value
# define __HS_BASE_ARGUMENTS _Value, hash<_Value>, equal_to<_Value>, _STLP_DEFAULT_ALLOCATOR(_Value)
# else
# define __HS_TEMPLATE_HEADER template <class _Value, class _HashFcn, class _EqualKey >
# define __HS_ARGUMENTS _Value, _HashFcn, _EqualKey
# define __HS_BASE_ARGUMENTS _Value, _HashFcn, _EqualKey, _STLP_DEFAULT_ALLOCATOR(_Value)
# endif
# define __HS_SUPER __hash_set< __HS_BASE_ARGUMENTS >
# define __HMS_SUPER __hash_multiset< __HS_BASE_ARGUMENTS >
// provide a "default" hash_set adaptor
__HS_TEMPLATE_HEADER
class hash_set : public __HS_SUPER
{
typedef hash_set< __HS_ARGUMENTS > _Self;
public:
typedef __HS_SUPER _Super;
__IMPORT_WITH_ITERATORS(_Super)
typedef typename _Super::key_type key_type;
typedef typename _Super::hasher hasher;
typedef typename _Super::key_equal key_equal;
hash_set() {}
hash_set(size_type n) : __HS_SUPER(n) {}
hash_set(size_type n, const hasher& hf) : __HS_SUPER(n, hf) {}
hash_set(size_type n, const hasher& hf, const key_equal& eql): __HS_SUPER(n, hf, eql) {}
hash_set(const value_type* f, const value_type* l) : __HS_SUPER(f,l) {}
hash_set(const value_type* f, const value_type* l, size_type n): __HS_SUPER(f,l,n) {}
hash_set(const value_type* f, const value_type* l, size_type n,
const hasher& hf) : __HS_SUPER(f,l,n,hf) {}
hash_set(const value_type* f, const value_type* l, size_type n,
const hasher& hf, const key_equal& eql) : __HS_SUPER(f,l,n,hf, eql) {}
hash_set(const_iterator f, const_iterator l) : __HS_SUPER(f,l) { }
hash_set(const_iterator f, const_iterator l, size_type n) : __HS_SUPER(f,l,n) { }
hash_set(const_iterator f, const_iterator l, size_type n,
const hasher& hf) : __HS_SUPER(f, l, n, hf) { }
hash_set(const_iterator f, const_iterator l, size_type n,
const hasher& hf, const key_equal& eql) : __HS_SUPER(f, l, n, hf, eql) { }
# if defined (_STLP_BASE_MATCH_BUG)
friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& hs1, const _Self& hs2);
# endif
};
# if defined (_STLP_BASE_MATCH_BUG)
__HS_TEMPLATE_HEADER
inline bool operator==(const hash_set< __HS_ARGUMENTS >& hs1,
const hash_set< __HS_ARGUMENTS >& hs2)
{
typedef __HS_SUPER _Super;
return (const _Super&)hs1 == (const _Super&)hs2;
}
# endif
// provide a "default" hash_multiset adaptor
__HS_TEMPLATE_HEADER
class hash_multiset : public __HMS_SUPER
{
typedef hash_multiset< __HS_ARGUMENTS > _Self;
public:
typedef __HMS_SUPER _Super;
__IMPORT_WITH_ITERATORS(_Super)
typedef typename _Super::key_type key_type;
typedef typename _Super::hasher hasher;
typedef typename _Super::key_equal key_equal;
hash_multiset() {}
hash_multiset(size_type __n) : __HMS_SUPER(__n) {}
hash_multiset(size_type __n, const hasher& __hf) : __HMS_SUPER(__n, __hf) {}
hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql): __HMS_SUPER(__n, __hf, __eql) {}
hash_multiset(const value_type* __f, const value_type* __l) : __HMS_SUPER(__f,__l) {}
hash_multiset(const value_type* __f, const value_type* __l, size_type __n): __HMS_SUPER(__f,__l,__n) {}
hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
const hasher& __hf) : __HMS_SUPER(__f,__l,__n,__hf) {}
hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
const hasher& __hf, const key_equal& __eql) : __HMS_SUPER(__f,__l,__n,__hf, __eql) {}
hash_multiset(const_iterator __f, const_iterator __l) : __HMS_SUPER(__f,__l) { }
hash_multiset(const_iterator __f, const_iterator __l, size_type __n) : __HMS_SUPER(__f,__l,__n) { }
hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
const hasher& __hf) : __HMS_SUPER(__f, __l, __n, __hf) { }
hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
const hasher& __hf, const key_equal& __eql) : __HMS_SUPER(__f, __l, __n, __hf, __eql) { }
# if defined (_STLP_BASE_MATCH_BUG)
friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hs1, const _Self& __hs2);
# endif
};
# if defined (_STLP_BASE_MATCH_BUG)
__HS_TEMPLATE_HEADER
inline bool operator==(const hash_multiset< __HS_ARGUMENTS >& __hs1,
const hash_multiset< __HS_ARGUMENTS >& __hs2)
{
typedef __HMS_SUPER __s;
return _STLP_STD::operator==((const __s&)__hs1,(const __s&)__hs2);
}
# endif
# undef __HS_SUPER
# undef __HMS_SUPER
# undef __HS_ARGUMENTS
# undef __HS_BASE_ARGUMENTS
# undef __HS_TEMPLATE_HEADER
# ifdef _STLP_USE_NAMESPACES
} /* namespace STLPORT */
# endif
#endif /* _STLP_INTERNAL_HASH_SET_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,86 @@
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Copyright (c) 1997
* Moscow Center for SPARC Technology
*
* Copyright (c) 1999
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef _STLP_INTERNAL_WRAP_LIST_H
#define _STLP_INTERNAL_WRAP_LIST_H
#ifndef _STLP_INTERNAL_LIST_H
# include <stl/_list.h>
#endif
# ifdef _STLP_USE_NAMESPACES
namespace STLPORT {
# endif
# if defined (_STLP_DEBUG)
# define __LIST_SUPER _DBG_list<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
# else
# define __LIST_SUPER __list__<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
# endif
// provide a "default" list adaptor
template <class _Tp>
class list : public __LIST_SUPER
{
public:
typedef __LIST_SUPER _Super;
__IMPORT_WITH_REVERSE_ITERATORS(_Super)
__IMPORT_SUPER_COPY_ASSIGNMENT(list, list<_Tp>, __LIST_SUPER)
list() { }
explicit list(size_type __n, const _Tp& __value) : __LIST_SUPER(__n, __value) { }
explicit list(size_type __n) : __LIST_SUPER(__n) { }
list(const _Tp* __first, const _Tp* __last) : __LIST_SUPER(__first, __last) { }
list(const_iterator __first, const_iterator __last) : __LIST_SUPER(__first, __last) { }
# undef __LIST_SUPER
};
# if defined (_STLP_BASE_MATCH_BUG)
template <class _Tp>
inline bool operator==(const list<_Tp>& __x, const list<_Tp>& __y) {
typedef typename list<_Tp>::_Super _Super;
return operator == ((const _Super&)__x,(const _Super&)__y);
}
template <class _Tp>
inline bool operator<(const list<_Tp>& __x, const list<_Tp>& __y) {
return lexicographical_compare(__x.begin(), __x.end(),
__y.begin(), __y.end());
}
# endif
# ifdef _STLP_USE_NAMESPACES
} /* namespace STLPORT */
# endif
#endif /* _STLP_INTERNAL_LIST_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,150 @@
/*
* Copyright (c) 1999, 2000
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef _STLP_INTERNAL_WRAP_MAP_H
#define _STLP_INTERNAL_WRAP_MAP_H
#ifndef _STLP_INTERNAL_MAP_H
# include <stl/_map.h>
#endif
# ifdef _STLP_USE_NAMESPACES
namespace STLPORT {
# endif
# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
# define __MAP_TEMPLATE_HEADER template <class _Key, class _Tp>
# define __MAP_ARGUMENTS _Key, _Tp
# define __MMAP_TEMPLATE_HEADER template <class _Key, class _Tp>
# define __MMAP_ARGUMENTS _Key, _Tp
# define _Compare less<_Key>
# else
# define __MAP_TEMPLATE_HEADER template <class _Key, class _Tp, class _Compare >
# define __MAP_ARGUMENTS _Key, _Tp, _Compare
# define __MMAP_TEMPLATE_HEADER template <class _Key, class _Tp, class _Compare >
# define __MMAP_ARGUMENTS _Key, _Tp, _Compare
# endif
# define __MAP_SUPER __map< _Key, _Tp, _Compare, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp) >
# define __MMAP_SUPER __multimap< _Key, _Tp, _Compare, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp) >
// provide a "default" map adaptor
__MAP_TEMPLATE_HEADER
class map : public __MAP_SUPER
{
typedef map< __MAP_ARGUMENTS > _Self;
public:
typedef __MAP_SUPER _Super;
__IMPORT_WITH_REVERSE_ITERATORS(_Super)
__IMPORT_SUPER_COPY_ASSIGNMENT(map, _Self, __MAP_SUPER)
map() : __MAP_SUPER(_Compare()) {}
explicit map(const _Compare& __comp) : __MAP_SUPER(__comp) {}
map(const typename _Super::value_type* __first,
const typename _Super::value_type* __last) :
__MAP_SUPER(__first, __last, _Compare()) { }
map(const typename _Super::value_type* __first,
const typename _Super::value_type* __last,
const _Compare& __comp) : __MAP_SUPER(__first, __last, __comp) { }
map(typename _Super::const_iterator __first,
typename _Super::const_iterator __last) :
__MAP_SUPER(__first, __last, _Compare()) { }
map(typename _Super::const_iterator __first,
typename _Super::const_iterator __last,
const _Compare& __comp) : __MAP_SUPER(__first, __last, __comp) { }
};
# if defined (_STLP_BASE_MATCH_BUG)
__MAP_TEMPLATE_HEADER
inline bool operator==(const map< __MAP_ARGUMENTS >& __x,
const map< __MAP_ARGUMENTS >& __y) {
typedef __MAP_SUPER _Super;
return operator==((const _Super&)__x,(const _Super&)__y);
}
__MAP_TEMPLATE_HEADER
inline bool operator<(const map< __MAP_ARGUMENTS >& __x,
const map< __MAP_ARGUMENTS >& __y) {
typedef __MAP_SUPER _Super;
return operator < ((const _Super&)__x,(const _Super&)__y);
}
# endif /* _STLP_BASE_MATCH_BUG */
// provide a "default" multimap adaptor
__MMAP_TEMPLATE_HEADER
class multimap : public __MMAP_SUPER
{
typedef multimap< __MMAP_ARGUMENTS > _Self;
public:
typedef __MMAP_SUPER _Super;
__IMPORT_WITH_REVERSE_ITERATORS(_Super)
// copy & assignment from super
__IMPORT_SUPER_COPY_ASSIGNMENT(multimap, _Self, __MMAP_SUPER)
multimap() : __MMAP_SUPER(_Compare()) {}
explicit multimap(const _Compare& __comp) : __MMAP_SUPER(__comp) {}
multimap(const typename _Super::value_type* __first,
const typename _Super::value_type* __last) :
__MMAP_SUPER(__first, __last, _Compare()) { }
multimap(const typename _Super::value_type* __first,
const typename _Super::value_type* __last,
const _Compare& __comp) : __MMAP_SUPER(__first, __last, __comp) { }
multimap(typename _Super::const_iterator __first,
typename _Super::const_iterator __last) :
__MMAP_SUPER(__first, __last, _Compare()) { }
multimap(typename _Super::const_iterator __first,
typename _Super::const_iterator __last,
const _Compare& __comp) : __MMAP_SUPER(__first, __last, __comp) { }
};
# if defined (_STLP_BASE_MATCH_BUG)
__MMAP_TEMPLATE_HEADER
inline bool operator==(const multimap< __MMAP_ARGUMENTS >& __x,
const multimap< __MMAP_ARGUMENTS >& __y) {
typedef __MMAP_SUPER _Super;
return (const _Super&)__x == (const _Super&)__y;
}
__MMAP_TEMPLATE_HEADER
inline bool operator<(const multimap< __MMAP_ARGUMENTS >& __x,
const multimap< __MMAP_ARGUMENTS >& __y) {
typedef __MMAP_SUPER _Super;
return (const _Super&)__x < (const _Super&)__y;
}
# endif
# undef __MMAP_TEMPLATE_HEADER
# undef __MMAP_ARGUMENTS
# undef __MMAP_SUPER
# undef __MAP_TEMPLATE_HEADER
# undef __MAP_ARGUMENTS
# undef __MAP_SUPER
# undef _Compare
# ifdef _STLP_USE_NAMESPACES
} /* namespace STLPORT */
# endif
#endif /* _STLP_INTERNAL_WRAP_MAP_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,46 @@
/*
* Copyright (c) 1999, 2000
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef _STLP_INTERNAL_WRAP_MULTIMAP_H
#define _STLP_INTERNAL_WRAP_MULTIMAP_H
# ifdef _STLP_USE_NAMESPACES
namespace STLPORT {
# endif
# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
# define _Compare less<_Key>
# else
# endif
# if defined (_STLP_DEBUG) && ! defined (_STLP_USE_NAMESPACES)
# else
# endif
# ifdef _STLP_USE_NAMESPACES
} /* namespace STLPORT */
# endif
#endif /* _STLP_INTERNAL_WRAP_MULTIMAP_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,141 @@
/*
* Copyright (c) 1999, 2000
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef _STLP_INTERNAL_WRAP_SET_H
#define _STLP_INTERNAL_WRAP_SET_H
#ifndef _STLP_INTERNAL_SET_H
# include <stl/_set.h>
#endif
# ifdef _STLP_USE_NAMESPACES
namespace STLPORT {
# endif
# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
# define __SET_TEMPLATE_HEADER template <class _Key>
# define __SET_ARGUMENTS _Key
# define __MSET_TEMPLATE_HEADER template <class _Key>
# define __MSET_ARGUMENTS _Key
# define _Compare less<_Key>
# else
# define __SET_TEMPLATE_HEADER template <class _Key, class _Compare >
# define __SET_ARGUMENTS _Key, _Compare
# define __MSET_TEMPLATE_HEADER template <class _Key, class _Compare >
# define __MSET_ARGUMENTS _Key, _Compare
# endif
# define __SET_SUPER __set< _Key, _Compare, _STLP_DEFAULT_ALLOCATOR(_Key) >
# define __MSET_SUPER __multiset< _Key, _Compare, _STLP_DEFAULT_ALLOCATOR(_Key) >
// provide a "default" set adaptor
__SET_TEMPLATE_HEADER
class set : public __SET_SUPER
{
typedef set< __SET_ARGUMENTS > _Self;
public:
typedef __SET_SUPER _Super;
__IMPORT_WITH_REVERSE_ITERATORS(_Super)
// copy & assignment from super
__IMPORT_SUPER_COPY_ASSIGNMENT(set,_Self,__SET_SUPER)
// specific constructors
explicit set() : __SET_SUPER(_Compare()) {}
explicit set(const _Compare& __comp) : __SET_SUPER(__comp) {}
set(const value_type* __first, const value_type* __last) :
__SET_SUPER(__first, __last, _Compare()) { }
set(const value_type* __first, const value_type* __last,
const _Compare& __comp) : __SET_SUPER(__first, __last, __comp) { }
set(const_iterator __first, const_iterator __last) :
__SET_SUPER(__first, __last, _Compare()) { }
set(const_iterator __first, const_iterator __last,
const _Compare& __comp) : __SET_SUPER(__first, __last, __comp) { }
};
# if defined (_STLP_BASE_MATCH_BUG)
__SET_TEMPLATE_HEADER
inline bool operator==(const set< __SET_ARGUMENTS >& __x,
const set< __SET_ARGUMENTS >& __y) {
typedef __SET_SUPER _Super;
return operator==((const _Super&)__x,(const _Super&)__y);
}
__SET_TEMPLATE_HEADER
inline bool operator<(const set< __SET_ARGUMENTS >& __x,
const set< __SET_ARGUMENTS >& __y) {
typedef __SET_SUPER _Super;
return operator < ((const _Super&)__x , (const _Super&)__y);
}
# endif
// provide a "default" multiset adaptor
__MSET_TEMPLATE_HEADER
class multiset : public __MSET_SUPER
{
typedef multiset< __MSET_ARGUMENTS > _Self;
public:
typedef __MSET_SUPER _Super;
__IMPORT_WITH_REVERSE_ITERATORS(_Super)
// copy & assignment from super
__IMPORT_SUPER_COPY_ASSIGNMENT(multiset, _Self, __MSET_SUPER)
explicit multiset() : __MSET_SUPER(_Compare()) {}
explicit multiset(const _Compare& __comp) : __MSET_SUPER(__comp) {}
multiset(const value_type* __first, const value_type* __last) :
__MSET_SUPER(__first, __last, _Compare()) { }
multiset(const value_type* __first, const value_type* __last,
const _Compare& __comp) : __MSET_SUPER(__first, __last, __comp) { }
multiset(const_iterator __first, const_iterator __last) :
__MSET_SUPER(__first, __last, _Compare()) { }
multiset(const_iterator __first, const_iterator __last,
const _Compare& __comp) : __MSET_SUPER(__first, __last, __comp) { }
};
# if defined (_STLP_BASE_MATCH_BUG)
__MSET_TEMPLATE_HEADER
inline bool operator==(const multiset< __MSET_ARGUMENTS >& __x,
const multiset< __MSET_ARGUMENTS >& __y) {
typedef __MSET_SUPER _Super;
return (const _Super&)__x == (const _Super&)__y;
}
__MSET_TEMPLATE_HEADER
inline bool operator<(const multiset< __MSET_ARGUMENTS >& __x,
const multiset< __MSET_ARGUMENTS >& __y) {
typedef __MSET_SUPER _Super;
return (const _Super&)__x < (const _Super&)__y;
}
# endif
# undef __MSET_TEMPLATE_HEADER
# undef __MSET_ARGUMENTS
# undef __MSET_SUPER
# undef __SET_TEMPLATE_HEADER
# undef __SET_ARGUMENTS
# undef __SET_SUPER
# undef _Compare
# ifdef _STLP_USE_NAMESPACES
} /* namespace STLPORT */
# endif
#endif /* _STLP_INTERNAL_WRAP_SET_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,83 @@
/*
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Copyright (c) 1997
* Moscow Center for SPARC Technology
*
* Copyright (c) 1999
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef _STLP_INTERNAL_WRAP_SLIST_H
#define _STLP_INTERNAL_WRAP_SLIST_H
#ifndef _STLP_INTERNAL_SLIST_H
# include <stl/_slist.h>
#endif
# if defined (_STLP_DEBUG)
# define __SL_SUPER _DBG_slist<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
# else
# define __SL_SUPER __slist__<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
# endif
# ifdef _STLP_USE_NAMESPACES
namespace STLPORT {
# endif
// provide a "default" list adaptor
template <class _Tp>
class slist : public __SL_SUPER
{
public:
typedef __SL_SUPER _Super;
__IMPORT_WITH_ITERATORS(_Super)
__IMPORT_SUPER_COPY_ASSIGNMENT(slist, slist<_Tp>, __SL_SUPER)
slist() { }
explicit slist(size_type __n, const _Tp& __value) : __SL_SUPER(__n, __value) { }
explicit slist(size_type __n) : __SL_SUPER(__n) { }
slist(const _Tp* __first, const _Tp* __last) : __SL_SUPER(__first, __last) { }
slist(const_iterator __first, const_iterator __last) : __SL_SUPER(__first, __last) { }
};
# if defined (_STLP_BASE_MATCH_BUG)
template <class _Tp>
inline bool operator==(const slist<_Tp>& __x, const slist<_Tp>& __y) {
typedef typename slist<_Tp>::_Super _Super;
return operator == ((const _Super&)__x,(const _Super&)__y);
}
template <class _Tp>
inline bool operator<(const slist<_Tp>& __x, const slist<_Tp>& __y) {
typedef typename slist<_Tp>::_Super _Super;
return operator < ((const _Super&)__x,(const _Super&)__y);
}
# endif
# undef __SL_SUPER
# ifdef _STLP_USE_NAMESPACES
} /* namespace STLPORT */
# endif
#endif /* _STLP_INTERNAL_WRAP_SLIST_H */
// Local Variables:
// mode:C++
// End:

View File

@@ -0,0 +1,89 @@
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Copyright (c) 1997
* Moscow Center for SPARC Technology
*
* Copyright (c) 1999
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef _STLP_INTERNAL_WRAP_VECTOR_H
#define _STLP_INTERNAL_WRAP_VECTOR_H
#ifndef _STLP_INTERNAL_VECTOR_H
# include <stl/_vector.h>
#endif
# if defined (_STLP_DEBUG)
# define _VEC_SUPER _DBG_vector<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
# else
# define _VEC_SUPER __vector__<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
# endif
# ifdef _STLP_USE_NAMESPACES
namespace STLPORT {
# endif
template <class _Tp>
class vector : public _VEC_SUPER
{
public:
typedef _VEC_SUPER _Super;
__IMPORT_WITH_REVERSE_ITERATORS(_Super)
__IMPORT_SUPER_COPY_ASSIGNMENT(vector, vector<_Tp>, _VEC_SUPER)
vector() {}
explicit vector(size_type __n, const _Tp& __value) : _VEC_SUPER(__n, __value) { }
explicit vector(size_type __n) : _VEC_SUPER(__n) { }
vector(const_iterator __first, const_iterator __last) : _VEC_SUPER(__first,__last) { }
# ifdef _STLP_DEBUG
// certainly, no member templates here !
vector(const _Tp* __first, const _Tp* __last) : _VEC_SUPER(__first,__last) { }
# endif
~vector() {}
};
# if defined (_STLP_BASE_MATCH_BUG)
template <class _Tp>
inline bool operator==(const vector<_Tp>& __x, const vector<_Tp>& __y) {
return __x.size() == __y.size() &&
equal(__x.begin(), __x.end(), __y.begin());
}
template <class _Tp>
inline bool operator<(const vector<_Tp>& __x, const vector<_Tp>& __y) {
return lexicographical_compare(__x.begin(), __x.end(),
__y.begin(), __y.end());
}
# endif /* _STLP_BASE_MATCH_BUG */
# undef _VEC_SUPER
// close std namespace
# ifdef _STLP_USE_NAMESPACES
}
# endif
#endif /* _STLP_WRAP_VECTOR_H */
// Local Variables:
// mode:C++
// End: