_slist.h

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

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