_raw_storage_iter.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_RAW_STORAGE_ITERATOR_H
00031 #define _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H
00032 
00033 #ifndef _STLP_INTERNAL_ITERATOR_BASE_H
00034 #  include <stl/_iterator_base.h>
00035 #endif
00036 
00037 _STLP_BEGIN_NAMESPACE
00038 
00039 template <class _ForwardIterator, class _Tp>
00040 class raw_storage_iterator 
00041 # ifdef _STLP_HAS_VOID_SPECIALIZATION
00042       : public iterator<output_iterator_tag,void,void,void,void> {
00043 # endif
00044 {
00045 protected:
00046   _ForwardIterator _M_iter;
00047 public:
00048   typedef output_iterator_tag iterator_category;
00049 # ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
00050   typedef void                value_type;
00051   typedef void                difference_type;
00052   typedef void                pointer;
00053   typedef void                reference;
00054 # endif
00055   explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {}
00056   raw_storage_iterator<_ForwardIterator, _Tp>& operator*() { return *this; }
00057   raw_storage_iterator<_ForwardIterator, _Tp>& operator=(const _Tp& __element) {
00058     _Construct(&*_M_iter, __element);
00059     return *this;
00060   }        
00061   raw_storage_iterator<_ForwardIterator, _Tp>& operator++() {
00062     ++_M_iter;
00063     return *this;
00064   }
00065   raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) {
00066     raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
00067     ++_M_iter;
00068     return __tmp;
00069   }
00070 };
00071 
00072 # ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
00073 template <class _ForwardIterator, class _Tp>
00074 inline output_iterator_tag iterator_category(const raw_storage_iterator<_ForwardIterator, _Tp>&) { return output_iterator_tag(); }
00075 #endif
00076 _STLP_END_NAMESPACE
00077 
00078 #endif /* _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H */
00079 
00080 // Local Variables:
00081 // mode:C++
00082 // End:

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