/home/ntakagi/work/STLport-5.1.5/stlport/stl/_raw_storage_iter.h

Go to the documentation of this file.
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       : public iterator<output_iterator_tag,void,void,void,void>
00042 {
00043 protected:
00044   _ForwardIterator _M_iter;
00045 public:
00046   typedef output_iterator_tag iterator_category;
00047 # ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
00048   typedef void                value_type;
00049   typedef void                difference_type;
00050   typedef void                pointer;
00051   typedef void                reference;
00052 # endif
00053   explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {}
00054   raw_storage_iterator<_ForwardIterator, _Tp>& operator*() { return *this; }
00055   raw_storage_iterator<_ForwardIterator, _Tp>& operator=(const _Tp& __element) {
00056     _Param_Construct(&*_M_iter, __element);
00057     return *this;
00058   }
00059   raw_storage_iterator<_ForwardIterator, _Tp>& operator++() {
00060     ++_M_iter;
00061     return *this;
00062   }
00063   raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) {
00064     raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
00065     ++_M_iter;
00066     return __tmp;
00067   }
00068 };
00069 
00070 # ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
00071 template <class _ForwardIterator, class _Tp>
00072 inline output_iterator_tag iterator_category(const raw_storage_iterator<_ForwardIterator, _Tp>&) { return output_iterator_tag(); }
00073 #endif
00074 _STLP_END_NAMESPACE
00075 
00076 #endif /* _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H */
00077 
00078 // Local Variables:
00079 // mode:C++
00080 // End:



Generated on Mon Mar 10 15:32:32 2008 by  doxygen 1.5.1