00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H
00032 #define __SGI_STL_INTERNAL_RAW_STORAGE_ITERATOR_H
00033
00034 __STL_BEGIN_NAMESPACE
00035
00036 template <class _ForwardIterator, class _Tp>
00037 class raw_storage_iterator {
00038 protected:
00039 _ForwardIterator _M_iter;
00040 public:
00041 typedef output_iterator_tag iterator_category;
00042 typedef void value_type;
00043 typedef void difference_type;
00044 typedef void pointer;
00045 typedef void reference;
00046
00047 explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {}
00048 raw_storage_iterator& operator*() { return *this; }
00049 raw_storage_iterator& operator=(const _Tp& __element) {
00050 construct(&*_M_iter, __element);
00051 return *this;
00052 }
00053 raw_storage_iterator<_ForwardIterator, _Tp>& operator++() {
00054 ++_M_iter;
00055 return *this;
00056 }
00057 raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) {
00058 raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
00059 ++_M_iter;
00060 return __tmp;
00061 }
00062 };
00063
00064 #ifndef __STL_CLASS_PARTIAL_SPECIALIZATION
00065
00066 template <class _ForwardIterator, class _Tp>
00067 inline output_iterator_tag
00068 iterator_category(const raw_storage_iterator<_ForwardIterator, _Tp>&)
00069 {
00070 return output_iterator_tag();
00071 }
00072
00073 #endif
00074
00075 __STL_END_NAMESPACE
00076
00077 #endif
00078
00079
00080
00081