_list.h

00001 /*
00002  *
00003  * Copyright (c) 1994
00004  * Hewlett-Packard Company
00005  *
00006  * Copyright (c) 1996,1997
00007  * Silicon Graphics Computer Systems, Inc.
00008  *
00009  * Copyright (c) 1997
00010  * Moscow Center for SPARC Technology
00011  *
00012  * Copyright (c) 1999 
00013  * Boris Fomitchev
00014  *
00015  * This material is provided "as is", with absolutely no warranty expressed
00016  * or implied. Any use is at your own risk.
00017  *
00018  * Permission to use or copy this software for any purpose is hereby granted 
00019  * without fee, provided the above notices are retained on all copies.
00020  * Permission to modify the code and to distribute modified code is granted,
00021  * provided the above notices are retained, and a notice that the code was
00022  * modified is included with the above copyright notice.
00023  *
00024  */
00025 
00026 /* NOTE: This is an internal header file, included by other STL headers.
00027  *   You should not attempt to use it directly.
00028  */
00029 
00030 #ifndef _STLP_INTERNAL_WRAP_LIST_H
00031 #define _STLP_INTERNAL_WRAP_LIST_H
00032 
00033 #ifndef _STLP_INTERNAL_LIST_H
00034 # include <stl/_list.h>
00035 #endif
00036 
00037 # ifdef _STLP_USE_NAMESPACES
00038 namespace STLPORT { 
00039 # endif
00040 
00041 # if defined (_STLP_DEBUG)
00042 #  define __LIST_SUPER _DBG_list<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
00043 # else
00044 #  define __LIST_SUPER __list__<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
00045 # endif
00046 
00047 
00048 // provide a "default" list adaptor
00049 template <class _Tp>
00050 class list : public __LIST_SUPER
00051 {
00052 public:
00053     typedef __LIST_SUPER _Super;
00054     __IMPORT_WITH_REVERSE_ITERATORS(_Super)
00055     __IMPORT_SUPER_COPY_ASSIGNMENT(list, list<_Tp>, __LIST_SUPER)
00056     list() { }
00057     explicit list(size_type __n, const _Tp& __value) : __LIST_SUPER(__n, __value) { }
00058     explicit list(size_type __n) :  __LIST_SUPER(__n) { } 
00059     list(const _Tp* __first, const _Tp* __last) : __LIST_SUPER(__first, __last) { } 
00060     list(const_iterator __first, const_iterator __last) : __LIST_SUPER(__first, __last) { }
00061 # undef __LIST_SUPER
00062 };
00063 
00064 #  if defined (_STLP_BASE_MATCH_BUG)
00065 template <class _Tp>
00066 inline bool operator==(const list<_Tp>& __x, const list<_Tp>& __y) {
00067     typedef typename list<_Tp>::_Super _Super;
00068     return operator == ((const _Super&)__x,(const _Super&)__y);
00069 }
00070 
00071 template <class _Tp>
00072 inline bool operator<(const list<_Tp>& __x, const list<_Tp>& __y) {
00073   return lexicographical_compare(__x.begin(), __x.end(),
00074                                  __y.begin(), __y.end());
00075 }
00076 #  endif
00077 
00078 # ifdef _STLP_USE_NAMESPACES
00079 } /* namespace STLPORT */
00080 # endif
00081 
00082 #endif /* _STLP_INTERNAL_LIST_H */
00083 
00084 // Local Variables:
00085 // mode:C++
00086 // End:

Generated on Mon Jun 5 10:20:46 2006 for Intelligence.kdevelop by  doxygen 1.4.6