Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygen_hash_set.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_HASH_SET_H 00031 #define _STLP_INTERNAL_HASH_SET_H 00032 00033 #ifndef _STLP_INTERNAL_HASHTABLE_H 00034 # include <stl/_hashtable.h> 00035 #endif 00036 00037 _STLP_BEGIN_NAMESPACE 00038 00039 //Specific iterator traits creation 00040 _STLP_CREATE_HASH_ITERATOR_TRAITS(HashSetTraitsT, Const_traits) 00041 00042 template <class _Value, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Value>), 00043 _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Value>), 00044 _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) > 00045 class hash_set 00046 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) 00047 : public __stlport_class<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > 00048 #endif 00049 { 00050 typedef hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Self; 00051 //Specific iterator traits creation 00052 typedef _STLP_PRIV _HashSetTraitsT<_Value> _HashSetTraits; 00053 public: 00054 typedef hashtable<_Value, _Value, _HashFcn, 00055 _HashSetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht; 00056 public: 00057 typedef typename _Ht::key_type key_type; 00058 typedef typename _Ht::value_type value_type; 00059 typedef typename _Ht::hasher hasher; 00060 typedef typename _Ht::key_equal key_equal; 00061 00062 typedef typename _Ht::size_type size_type; 00063 typedef typename _Ht::difference_type difference_type; 00064 typedef typename _Ht::pointer pointer; 00065 typedef typename _Ht::const_pointer const_pointer; 00066 typedef typename _Ht::reference reference; 00067 typedef typename _Ht::const_reference const_reference; 00068 00069 typedef typename _Ht::iterator iterator; 00070 typedef typename _Ht::const_iterator const_iterator; 00071 00072 typedef typename _Ht::allocator_type allocator_type; 00073 00074 hasher hash_funct() const { return _M_ht.hash_funct(); } 00075 key_equal key_eq() const { return _M_ht.key_eq(); } 00076 allocator_type get_allocator() const { return _M_ht.get_allocator(); } 00077 00078 private: 00079 _Ht _M_ht; 00080 _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) 00081 00082 public: 00083 hash_set() 00084 : _M_ht(0, hasher(), key_equal(), allocator_type()) {} 00085 explicit hash_set(size_type __n) 00086 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} 00087 hash_set(size_type __n, const hasher& __hf) 00088 : _M_ht(__n, __hf, key_equal(), allocator_type()) {} 00089 #if !defined (_STLP_DONT_SUP_DFLT_PARAM) 00090 hash_set(size_type __n, const hasher& __hf, const key_equal& __eql, 00091 const allocator_type& __a = allocator_type()) 00092 #else 00093 hash_set(size_type __n, const hasher& __hf, const key_equal& __eql) 00094 : _M_ht(__n, __hf, __eql, allocator_type()) {} 00095 hash_set(size_type __n, const hasher& __hf, const key_equal& __eql, 00096 const allocator_type& __a) 00097 #endif 00098 : _M_ht(__n, __hf, __eql, __a) {} 00099 00100 #if !defined (_STLP_NO_MOVE_SEMANTIC) 00101 hash_set(__move_source<_Self> src) 00102 : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} 00103 #endif 00104 00105 #if defined (_STLP_MEMBER_TEMPLATES) 00106 template <class _InputIterator> 00107 hash_set(_InputIterator __f, _InputIterator __l) 00108 : _M_ht(0, hasher(), key_equal(), allocator_type()) 00109 { _M_ht.insert_unique(__f, __l); } 00110 template <class _InputIterator> 00111 hash_set(_InputIterator __f, _InputIterator __l, size_type __n) 00112 : _M_ht(__n, hasher(), key_equal(), allocator_type()) 00113 { _M_ht.insert_unique(__f, __l); } 00114 template <class _InputIterator> 00115 hash_set(_InputIterator __f, _InputIterator __l, size_type __n, 00116 const hasher& __hf) 00117 : _M_ht(__n, __hf, key_equal(), allocator_type()) 00118 { _M_ht.insert_unique(__f, __l); } 00119 template <class _InputIterator> 00120 hash_set(_InputIterator __f, _InputIterator __l, size_type __n, 00121 const hasher& __hf, const key_equal& __eql, 00122 const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) 00123 : _M_ht(__n, __hf, __eql, __a) 00124 { _M_ht.insert_unique(__f, __l); } 00125 # if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) 00126 template <class _InputIterator> 00127 hash_set(_InputIterator __f, _InputIterator __l, size_type __n, 00128 const hasher& __hf, const key_equal& __eql) 00129 : _M_ht(__n, __hf, __eql, allocator_type()) 00130 { _M_ht.insert_unique(__f, __l); } 00131 # endif 00132 #else 00133 hash_set(const value_type* __f, const value_type* __l) 00134 : _M_ht(0, hasher(), key_equal(), allocator_type()) 00135 { _M_ht.insert_unique(__f, __l); } 00136 hash_set(const value_type* __f, const value_type* __l, size_type __n) 00137 : _M_ht(__n, hasher(), key_equal(), allocator_type()) 00138 { _M_ht.insert_unique(__f, __l); } 00139 hash_set(const value_type* __f, const value_type* __l, size_type __n, 00140 const hasher& __hf) 00141 : _M_ht(__n, __hf, key_equal(), allocator_type()) 00142 { _M_ht.insert_unique(__f, __l); } 00143 hash_set(const value_type* __f, const value_type* __l, size_type __n, 00144 const hasher& __hf, const key_equal& __eql, 00145 const allocator_type& __a = allocator_type()) 00146 : _M_ht(__n, __hf, __eql, __a) 00147 { _M_ht.insert_unique(__f, __l); } 00148 00149 hash_set(const_iterator __f, const_iterator __l) 00150 : _M_ht(0, hasher(), key_equal(), allocator_type()) 00151 { _M_ht.insert_unique(__f, __l); } 00152 hash_set(const_iterator __f, const_iterator __l, size_type __n) 00153 : _M_ht(__n, hasher(), key_equal(), allocator_type()) 00154 { _M_ht.insert_unique(__f, __l); } 00155 hash_set(const_iterator __f, const_iterator __l, size_type __n, 00156 const hasher& __hf) 00157 : _M_ht(__n, __hf, key_equal(), allocator_type()) 00158 { _M_ht.insert_unique(__f, __l); } 00159 hash_set(const_iterator __f, const_iterator __l, size_type __n, 00160 const hasher& __hf, const key_equal& __eql, 00161 const allocator_type& __a = allocator_type()) 00162 : _M_ht(__n, __hf, __eql, __a) 00163 { _M_ht.insert_unique(__f, __l); } 00164 #endif /*_STLP_MEMBER_TEMPLATES */ 00165 00166 public: 00167 size_type size() const { return _M_ht.size(); } 00168 size_type max_size() const { return _M_ht.max_size(); } 00169 bool empty() const { return _M_ht.empty(); } 00170 void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); } 00171 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 00172 void _M_swap_workaround(_Self& __x) { swap(__x); } 00173 #endif 00174 00175 iterator begin() { return _M_ht.begin(); } 00176 iterator end() { return _M_ht.end(); } 00177 const_iterator begin() const { return _M_ht.begin(); } 00178 const_iterator end() const { return _M_ht.end(); } 00179 00180 public: 00181 pair<iterator, bool> insert(const value_type& __obj) 00182 { return _M_ht.insert_unique(__obj); } 00183 #if defined (_STLP_MEMBER_TEMPLATES) 00184 template <class _InputIterator> 00185 void insert(_InputIterator __f, _InputIterator __l) 00186 #else 00187 void insert(const_iterator __f, const_iterator __l) 00188 {_M_ht.insert_unique(__f, __l); } 00189 void insert(const value_type* __f, const value_type* __l) 00190 #endif 00191 { _M_ht.insert_unique(__f,__l); } 00192 00193 pair<iterator, bool> insert_noresize(const value_type& __obj) 00194 { return _M_ht.insert_unique_noresize(__obj); } 00195 00196 _STLP_TEMPLATE_FOR_CONT_EXT 00197 iterator find(const _KT& __key) { return _M_ht.find(__key); } 00198 _STLP_TEMPLATE_FOR_CONT_EXT 00199 const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } 00200 00201 _STLP_TEMPLATE_FOR_CONT_EXT 00202 size_type count(const _KT& __key) const { return _M_ht.count(__key); } 00203 00204 _STLP_TEMPLATE_FOR_CONT_EXT 00205 pair<iterator, iterator> equal_range(const _KT& __key) 00206 { return _M_ht.equal_range(__key); } 00207 _STLP_TEMPLATE_FOR_CONT_EXT 00208 pair<const_iterator, const_iterator> equal_range(const _KT& __key) const 00209 { return _M_ht.equal_range(__key); } 00210 00211 _STLP_TEMPLATE_FOR_CONT_EXT 00212 size_type erase(const _KT& __key) {return _M_ht.erase(__key); } 00213 void erase(iterator __it) { _M_ht.erase(__it); } 00214 void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } 00215 void clear() { _M_ht.clear(); } 00216 00217 public: 00218 void resize(size_type __hint) { _M_ht.resize(__hint); } 00219 size_type bucket_count() const { return _M_ht.bucket_count(); } 00220 size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } 00221 size_type elems_in_bucket(size_type __n) const 00222 { return _M_ht.elems_in_bucket(__n); } 00223 }; 00224 00225 //Specific iterator traits creation 00226 _STLP_CREATE_HASH_ITERATOR_TRAITS(HashMultisetTraitsT, Const_traits) 00227 00228 template <class _Value, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Value>), 00229 _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Value>), 00230 _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) > 00231 class hash_multiset 00232 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) 00233 : public __stlport_class<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > 00234 #endif 00235 { 00236 typedef hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Self; 00237 //Specific iterator traits creation 00238 typedef _STLP_PRIV _HashMultisetTraitsT<_Value> _HashMultisetTraits; 00239 public: 00240 typedef hashtable<_Value, _Value, _HashFcn, 00241 _HashMultisetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht; 00242 00243 typedef typename _Ht::key_type key_type; 00244 typedef typename _Ht::value_type value_type; 00245 typedef typename _Ht::hasher hasher; 00246 typedef typename _Ht::key_equal key_equal; 00247 00248 typedef typename _Ht::size_type size_type; 00249 typedef typename _Ht::difference_type difference_type; 00250 typedef typename _Ht::pointer pointer; 00251 typedef typename _Ht::const_pointer const_pointer; 00252 typedef typename _Ht::reference reference; 00253 typedef typename _Ht::const_reference const_reference; 00254 00255 typedef typename _Ht::iterator iterator; 00256 typedef typename _Ht::const_iterator const_iterator; 00257 00258 typedef typename _Ht::allocator_type allocator_type; 00259 00260 hasher hash_funct() const { return _M_ht.hash_funct(); } 00261 key_equal key_eq() const { return _M_ht.key_eq(); } 00262 allocator_type get_allocator() const { return _M_ht.get_allocator(); } 00263 00264 private: 00265 _Ht _M_ht; 00266 _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) 00267 00268 public: 00269 hash_multiset() 00270 : _M_ht(0, hasher(), key_equal(), allocator_type()) {} 00271 explicit hash_multiset(size_type __n) 00272 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} 00273 hash_multiset(size_type __n, const hasher& __hf) 00274 : _M_ht(__n, __hf, key_equal(), allocator_type()) {} 00275 hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql) 00276 : _M_ht(__n, __hf, __eql, allocator_type()) {} 00277 hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql, 00278 const allocator_type& __a) 00279 : _M_ht(__n, __hf, __eql, __a) {} 00280 00281 #if !defined (_STLP_NO_MOVE_SEMANTIC) 00282 hash_multiset(__move_source<_Self> src) 00283 : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} 00284 #endif 00285 00286 #if defined (_STLP_MEMBER_TEMPLATES) 00287 template <class _InputIterator> 00288 hash_multiset(_InputIterator __f, _InputIterator __l) 00289 : _M_ht(0, hasher(), key_equal(), allocator_type()) 00290 { _M_ht.insert_equal(__f, __l); } 00291 template <class _InputIterator> 00292 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n) 00293 : _M_ht(__n, hasher(), key_equal(), allocator_type()) 00294 { _M_ht.insert_equal(__f, __l); } 00295 template <class _InputIterator> 00296 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, 00297 const hasher& __hf) 00298 : _M_ht(__n, __hf, key_equal(), allocator_type()) 00299 { _M_ht.insert_equal(__f, __l); } 00300 00301 template <class _InputIterator> 00302 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, 00303 const hasher& __hf, const key_equal& __eql, 00304 const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) 00305 : _M_ht(__n, __hf, __eql, __a) 00306 { _M_ht.insert_equal(__f, __l); } 00307 # if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) 00308 template <class _InputIterator> 00309 hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n, 00310 const hasher& __hf, const key_equal& __eql) 00311 : _M_ht(__n, __hf, __eql, allocator_type()) 00312 { _M_ht.insert_equal(__f, __l); } 00313 # endif 00314 #else 00315 hash_multiset(const value_type* __f, const value_type* __l) 00316 : _M_ht(0, hasher(), key_equal(), allocator_type()) 00317 { _M_ht.insert_equal(__f, __l); } 00318 hash_multiset(const value_type* __f, const value_type* __l, size_type __n) 00319 : _M_ht(__n, hasher(), key_equal(), allocator_type()) 00320 { _M_ht.insert_equal(__f, __l); } 00321 hash_multiset(const value_type* __f, const value_type* __l, size_type __n, 00322 const hasher& __hf) 00323 : _M_ht(__n, __hf, key_equal(), allocator_type()) 00324 { _M_ht.insert_equal(__f, __l); } 00325 hash_multiset(const value_type* __f, const value_type* __l, size_type __n, 00326 const hasher& __hf, const key_equal& __eql, 00327 const allocator_type& __a = allocator_type()) 00328 : _M_ht(__n, __hf, __eql, __a) 00329 { _M_ht.insert_equal(__f, __l); } 00330 00331 hash_multiset(const_iterator __f, const_iterator __l) 00332 : _M_ht(0, hasher(), key_equal(), allocator_type()) 00333 { _M_ht.insert_equal(__f, __l); } 00334 hash_multiset(const_iterator __f, const_iterator __l, size_type __n) 00335 : _M_ht(__n, hasher(), key_equal(), allocator_type()) 00336 { _M_ht.insert_equal(__f, __l); } 00337 hash_multiset(const_iterator __f, const_iterator __l, size_type __n, 00338 const hasher& __hf) 00339 : _M_ht(__n, __hf, key_equal(), allocator_type()) 00340 { _M_ht.insert_equal(__f, __l); } 00341 hash_multiset(const_iterator __f, const_iterator __l, size_type __n, 00342 const hasher& __hf, const key_equal& __eql, 00343 const allocator_type& __a = allocator_type()) 00344 : _M_ht(__n, __hf, __eql, __a) 00345 { _M_ht.insert_equal(__f, __l); } 00346 #endif /*_STLP_MEMBER_TEMPLATES */ 00347 00348 public: 00349 size_type size() const { return _M_ht.size(); } 00350 size_type max_size() const { return _M_ht.max_size(); } 00351 bool empty() const { return _M_ht.empty(); } 00352 void swap(_Self& hs) { _M_ht.swap(hs._M_ht); } 00353 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) 00354 void _M_swap_workaround(_Self& __x) { swap(__x); } 00355 #endif 00356 00357 iterator begin() { return _M_ht.begin(); } 00358 iterator end() { return _M_ht.end(); } 00359 const_iterator begin() const { return _M_ht.begin(); } 00360 const_iterator end() const { return _M_ht.end(); } 00361 00362 public: 00363 iterator insert(const value_type& __obj) { return _M_ht.insert_equal(__obj); } 00364 #if defined (_STLP_MEMBER_TEMPLATES) 00365 template <class _InputIterator> 00366 void insert(_InputIterator __f, _InputIterator __l) 00367 { _M_ht.insert_equal(__f,__l); } 00368 #else 00369 void insert(const value_type* __f, const value_type* __l) 00370 { _M_ht.insert_equal(__f,__l); } 00371 void insert(const_iterator __f, const_iterator __l) 00372 { _M_ht.insert_equal(__f, __l); } 00373 #endif /*_STLP_MEMBER_TEMPLATES */ 00374 iterator insert_noresize(const value_type& __obj) 00375 { return _M_ht.insert_equal_noresize(__obj); } 00376 00377 _STLP_TEMPLATE_FOR_CONT_EXT 00378 iterator find(const _KT& __key) { return _M_ht.find(__key); } 00379 00380 _STLP_TEMPLATE_FOR_CONT_EXT 00381 const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } 00382 00383 _STLP_TEMPLATE_FOR_CONT_EXT 00384 size_type count(const _KT& __key) const { return _M_ht.count(__key); } 00385 00386 _STLP_TEMPLATE_FOR_CONT_EXT 00387 pair<iterator, iterator> equal_range(const _KT& __key) 00388 { return _M_ht.equal_range(__key); } 00389 _STLP_TEMPLATE_FOR_CONT_EXT 00390 pair<const_iterator, const_iterator> equal_range(const _KT& __key) const 00391 { return _M_ht.equal_range(__key); } 00392 00393 _STLP_TEMPLATE_FOR_CONT_EXT 00394 size_type erase(const _KT& __key) {return _M_ht.erase(__key); } 00395 void erase(iterator __it) { _M_ht.erase(__it); } 00396 void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } 00397 void clear() { _M_ht.clear(); } 00398 00399 public: 00400 void resize(size_type __hint) { _M_ht.resize(__hint); } 00401 size_type bucket_count() const { return _M_ht.bucket_count(); } 00402 size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } 00403 size_type elems_in_bucket(size_type __n) const 00404 { return _M_ht.elems_in_bucket(__n); } 00405 }; 00406 00407 #define _STLP_TEMPLATE_HEADER template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 00408 #define _STLP_TEMPLATE_CONTAINER hash_set<_Value,_HashFcn,_EqualKey,_Alloc> 00409 00410 #include <stl/_relops_hash_cont.h> 00411 00412 #undef _STLP_TEMPLATE_CONTAINER 00413 #define _STLP_TEMPLATE_CONTAINER hash_multiset<_Value,_HashFcn,_EqualKey,_Alloc> 00414 #include <stl/_relops_hash_cont.h> 00415 00416 #undef _STLP_TEMPLATE_CONTAINER 00417 #undef _STLP_TEMPLATE_HEADER 00418 00419 // Specialization of insert_iterator so that it will work for hash_set 00420 // and hash_multiset. 00421 00422 #if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) 00423 # if !defined (_STLP_NO_MOVE_SEMANTIC) 00424 template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 00425 struct __move_traits<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > : 00426 _STLP_PRIV __move_traits_aux<typename hash_set<_Value, _HashFcn, _EqualKey, _Alloc>::_Ht> 00427 {}; 00428 00429 template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 00430 struct __move_traits<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > : 00431 _STLP_PRIV __move_traits_aux<typename hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>::_Ht> 00432 {}; 00433 # endif 00434 00435 template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 00436 class insert_iterator<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > { 00437 protected: 00438 typedef hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Container; 00439 _Container* container; 00440 public: 00441 typedef _Container container_type; 00442 typedef output_iterator_tag iterator_category; 00443 typedef void value_type; 00444 typedef void difference_type; 00445 typedef void pointer; 00446 typedef void reference; 00447 00448 insert_iterator(_Container& __x) : container(&__x) {} 00449 insert_iterator(_Container& __x, typename _Container::iterator) 00450 : container(&__x) {} 00451 insert_iterator<_Container>& 00452 operator=(const typename _Container::value_type& __val) { 00453 container->insert(__val); 00454 return *this; 00455 } 00456 insert_iterator<_Container>& operator*() { return *this; } 00457 insert_iterator<_Container>& operator++() { return *this; } 00458 insert_iterator<_Container>& operator++(int) { return *this; } 00459 }; 00460 00461 template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> 00462 class insert_iterator<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > { 00463 protected: 00464 typedef hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Container; 00465 _Container* container; 00466 typename _Container::iterator iter; 00467 public: 00468 typedef _Container container_type; 00469 typedef output_iterator_tag iterator_category; 00470 typedef void value_type; 00471 typedef void difference_type; 00472 typedef void pointer; 00473 typedef void reference; 00474 00475 insert_iterator(_Container& __x) : container(&__x) {} 00476 insert_iterator(_Container& __x, typename _Container::iterator) 00477 : container(&__x) {} 00478 insert_iterator<_Container>& 00479 operator=(const typename _Container::value_type& __val) { 00480 container->insert(__val); 00481 return *this; 00482 } 00483 insert_iterator<_Container>& operator*() { return *this; } 00484 insert_iterator<_Container>& operator++() { return *this; } 00485 insert_iterator<_Container>& operator++(int) { return *this; } 00486 }; 00487 #endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ 00488 00489 _STLP_END_NAMESPACE 00490 00491 #endif /* _STLP_INTERNAL_HASH_SET_H */ 00492 00493 // Local Variables: 00494 // mode:C++ 00495 // End: Generated on Sun May 27 2012 04:29:04 for ReactOS by
1.7.6.1
|