_deque.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 #ifndef _STLP_INTERNAL_DEQUE_H
00027 # include <stl/_deque.h>
00028 #endif
00029 
00030 # if defined (_STLP_DEBUG)
00031 #  define _DEQUE_SUPER_NAME _DBG_deque
00032 # else
00033 #  define _DEQUE_SUPER_NAME __deque__
00034 # endif
00035 
00036 # define _DEQUE_SUPER   _DEQUE_SUPER_NAME<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
00037 
00038 _STLP_BEGIN_NAMESPACE
00039 
00040 // provide a "default" deque adaptor
00041 template <class _Tp>
00042 class deque : public _DEQUE_SUPER {
00043 public:
00044   typedef deque<_Tp> _Self;
00045   typedef _DEQUE_SUPER _Super;
00046   __IMPORT_WITH_REVERSE_ITERATORS(_Super)
00047     __IMPORT_SUPER_COPY_ASSIGNMENT(deque, _Self, _DEQUE_SUPER)
00048     deque() : _DEQUE_SUPER() { }
00049   deque(size_type __n, const _Tp& __value) : _DEQUE_SUPER(__n, __value) { }
00050   explicit deque(size_type __n) : _DEQUE_SUPER(__n) { }
00051   deque(const _Tp* __first, const _Tp* __last) : _DEQUE_SUPER(__first, __last) { }
00052   deque(const_iterator __first, const_iterator __last) : _DEQUE_SUPER(__first, __last) { }
00053   ~deque() { }
00054 };
00055 
00056 #  if defined (_STLP_BASE_MATCH_BUG)
00057 template <class _Tp>
00058 inline bool 
00059 operator==(const deque<_Tp>& __x, const deque<_Tp>& __y) {
00060     return __x.size() == __y.size() && equal(__x.begin(), __x.end(), __y.begin());
00061 }
00062 
00063 template <class _Tp>
00064 inline bool 
00065 operator<(const deque<_Tp>& __x, const deque<_Tp>& __y) {
00066     return lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
00067 }
00068 #  endif /* BASE_MATCH_BUG */
00069 
00070 # undef _DEQUE_SUPER
00071 
00072 _STLP_END_NAMESPACE  
00073 
00074 // Local Variables:
00075 // mode:C++
00076 // End:

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