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 #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
00079
00080
00081
00082