_vector.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_VECTOR_H
00031 #define _STLP_INTERNAL_WRAP_VECTOR_H
00032 
00033 #ifndef _STLP_INTERNAL_VECTOR_H
00034 # include <stl/_vector.h>
00035 #endif
00036 
00037 # if defined (_STLP_DEBUG)
00038 #  define _VEC_SUPER _DBG_vector<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
00039 # else
00040 #  define _VEC_SUPER __vector__<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
00041 # endif
00042 
00043 # ifdef _STLP_USE_NAMESPACES
00044 namespace STLPORT { 
00045 # endif
00046 
00047 template <class _Tp>
00048 class vector : public _VEC_SUPER
00049 {
00050 public:
00051     typedef _VEC_SUPER  _Super;
00052     __IMPORT_WITH_REVERSE_ITERATORS(_Super)
00053     __IMPORT_SUPER_COPY_ASSIGNMENT(vector, vector<_Tp>, _VEC_SUPER)
00054     vector() {}
00055     explicit vector(size_type __n, const _Tp& __value) : _VEC_SUPER(__n, __value) { }
00056     explicit vector(size_type __n) : _VEC_SUPER(__n) { }
00057     vector(const_iterator __first, const_iterator __last) : _VEC_SUPER(__first,__last) { }
00058 # ifdef _STLP_DEBUG
00059   // certainly, no member templates here !
00060     vector(const _Tp* __first, const _Tp* __last) : _VEC_SUPER(__first,__last) { }    
00061 # endif
00062     ~vector() {}
00063 };
00064 
00065 #  if defined (_STLP_BASE_MATCH_BUG)
00066 template <class _Tp>
00067 inline bool operator==(const vector<_Tp>& __x, const vector<_Tp>& __y) {
00068   return __x.size() == __y.size() &&
00069     equal(__x.begin(), __x.end(), __y.begin());
00070 }
00071 
00072 template <class _Tp>
00073 inline bool operator<(const vector<_Tp>& __x, const vector<_Tp>& __y) {
00074   return lexicographical_compare(__x.begin(), __x.end(), 
00075                                  __y.begin(), __y.end());
00076 }
00077 #  endif /* _STLP_BASE_MATCH_BUG */
00078 #  undef _VEC_SUPER
00079 
00080 // close std namespace
00081 # ifdef _STLP_USE_NAMESPACES
00082 }
00083 # endif
00084 
00085 #endif /* _STLP_WRAP_VECTOR_H */
00086 
00087 // Local Variables:
00088 // mode:C++
00089 // End:

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