BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstp_hashmap.h
Go to the documentation of this file.
1/// @file bslstp_hashmap.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslstp_hashmap.h -*-C++-*-
8#ifndef INCLUDED_BSLSTP_HASHMAP
9#define INCLUDED_BSLSTP_HASHMAP
10
11/// @defgroup bslstp_hashmap bslstp_hashmap
12/// @brief Provide containers indexed by a hashed key value.
13/// @addtogroup bsl
14/// @{
15/// @addtogroup bslstp
16/// @{
17/// @addtogroup bslstp_hashmap
18/// @{
19///
20/// <h1> Outline </h1>
21/// * <a href="#bslstp_hashmap-purpose"> Purpose</a>
22/// * <a href="#bslstp_hashmap-classes"> Classes </a>
23/// * <a href="#bslstp_hashmap-description"> Description </a>
24/// * <a href="#bslstp_hashmap-usage"> Usage </a>
25///
26/// # Purpose {#bslstp_hashmap-purpose}
27/// Provide containers indexed by a hashed key value.
28///
29/// @deprecated Do not use directly.
30///
31/// # Classes {#bslstp_hashmap-classes}
32///
33/// - bsl::hash_map: map key to value uniquely
34/// - bsl::hash_multimap: map key to value(s)
35///
36/// @see bsl_unordered_map
37///
38/// # Description {#bslstp_hashmap-description}
39/// This component is for internal use only. Please include
40/// `<bsl_hash_map.h>` instead.
41///
42/// Note that the functions in this component are based on STLPort's
43/// implementation, with copyright notice as follows:
44/// @code
45/// /*
46/// * Copyright (c) 1996,1997
47/// * Silicon Graphics Computer Systems, Inc.
48/// *
49/// * Copyright (c) 1999
50/// * Boris Fomitchev
51/// *
52/// * This material is provided "as is", with absolutely no warranty expressed
53/// * or implied. Any use is at your own risk.
54/// *
55/// * Permission to use or copy this software for any purpose is hereby granted
56/// * without fee, provided the above notices are retained on all copies.
57/// * Permission to modify the code and to distribute modified code is granted,
58/// * provided the above notices are retained, and a notice that the code was
59/// * modified is included with the above copyright notice.
60/// *
61/// */
62///
63/// // Contents originally from stl/_hash_map.h
64///
65/// /*
66/// *
67/// * Copyright (c) 1994
68/// * Hewlett-Packard Company
69/// *
70/// * Copyright (c) 1996,1997
71/// * Silicon Graphics Computer Systems, Inc.
72/// *
73/// * Copyright (c) 1997
74/// * Moscow Center for SPARC Technology
75/// *
76/// * Copyright (c) 1999
77/// * Boris Fomitchev
78/// *
79/// * This material is provided "as is", with absolutely no warranty expressed
80/// * or implied. Any use is at your own risk.
81/// *
82/// * Permission to use or copy this software for any purpose is hereby granted
83/// * without fee, provided the above notices are retained on all copies.
84/// * Permission to modify the code and to distribute modified code is granted,
85/// * provided the above notices are retained, and a notice that the code was
86/// * modified is included with the above copyright notice.
87/// *
88/// */
89/// @endcode
90///
91/// ## Usage {#bslstp_hashmap-usage}
92///
93///
94/// This component is for internal use only.
95/// @}
96/** @} */
97/** @} */
98
99/** @addtogroup bsl
100 * @{
101 */
102/** @addtogroup bslstp
103 * @{
104 */
105/** @addtogroup bslstp_hashmap
106 * @{
107 */
108
109#ifdef BDE_OPENSOURCE_PUBLICATION // STP
110#error "bslstp_hashmap is not for publication"
111#endif
112#include <bslscm_version.h>
113
114#include <bslstp_alloc.h>
115
116#include <bslstp_exfunctional.h>
117#include <bslstp_hash.h>
118#include <bslstp_hashtable.h>
119#include <bslstp_iterator.h>
120
122
124
125#include <functional>
126
127namespace bsl {
128
129
130template <class _Key, class _Tp,
131 class _HashFcn =
132 typename ::BloombergLP::bslstp::HashSelector<_Key>::Type,
133 class _EqualKey = typename bsl::ComparatorSelector<_Key>::Type,
136{
137private:
139 typedef hashtable<_Ht_pair, _Key, _HashFcn,
140 select1st<_Ht_pair>, _EqualKey, _Alloc> _Ht;
142public:
143 typedef typename _Ht::key_type key_type;
144 typedef _Tp data_type;
145 typedef _Tp mapped_type;
146 typedef typename _Ht::value_type _value_type;
147 typedef typename _Ht::value_type value_type;
148 typedef typename _Ht::hasher hasher;
149 typedef typename _Ht::key_equal key_equal;
150
151 typedef typename _Ht::size_type size_type;
153 typedef typename _Ht::pointer pointer;
155 typedef typename _Ht::reference reference;
157
158 typedef typename _Ht::iterator iterator;
160
162
163 hasher hash_funct() const { return _M_ht.hash_funct(); }
164 key_equal key_eq() const { return _M_ht.key_eq(); }
165 allocator_type get_allocator() const { return _M_ht.get_allocator(); }
166
167private:
168 _Ht _M_ht;
169public:
170 hash_map() : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
171 explicit hash_map(size_type __n)
172 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
173 hash_map(size_type __n, const hasher& __hf)
174 : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
175
176 // Constructors with alternative allocator.
177 explicit hash_map(const allocator_type& __a)
178 : _M_ht(100, hasher(), key_equal(), __a) {}
180 : _M_ht(__n, hasher(), key_equal(), __a) {}
181 hash_map(size_type __n, const hasher& __hf, const allocator_type& __a)
182 : _M_ht(__n, __hf, key_equal(), __a) {}
183
184 hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
185 const allocator_type& __a = allocator_type())
186 : _M_ht(__n, __hf, __eql, __a) {}
187
188 template <class _InputIterator>
189 hash_map(_InputIterator __f, _InputIterator __l)
190 : _M_ht(100, hasher(), key_equal(), allocator_type())
191 { _M_ht.insert_unique(__f, __l); }
192 template <class _InputIterator>
193 hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
194 : _M_ht(__n, hasher(), key_equal(), allocator_type())
195 { _M_ht.insert_unique(__f, __l); }
196 template <class _InputIterator>
197 hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
198 const hasher& __hf)
199 : _M_ht(__n, __hf, key_equal(), allocator_type())
200 { _M_ht.insert_unique(__f, __l); }
201
202 // Constructors with alternative allocator.
203 template <class _InputIterator>
204 hash_map(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
205 : _M_ht(100, hasher(), key_equal(), __a)
206 { _M_ht.insert_unique(__f, __l); }
207 template <class _InputIterator>
208 hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
209 const allocator_type& __a)
210 : _M_ht(__n, hasher(), key_equal(), __a)
211 { _M_ht.insert_unique(__f, __l); }
212 template <class _InputIterator>
213 hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
214 const hasher& __hf, const allocator_type& __a)
215 : _M_ht(__n, __hf, key_equal(), __a)
216 { _M_ht.insert_unique(__f, __l); }
217
218 template <class _InputIterator>
219 hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
220 const hasher& __hf, const key_equal& __eql,
221 const allocator_type& __a = allocator_type())
222 : _M_ht(__n, __hf, __eql, __a)
223 { _M_ht.insert_unique(__f, __l); }
224
225
226 // Copy-construct with alternative allocator.
227 // NOTE: Default copy-constructor is generated by the compiler
228 hash_map(const _Self& __x, const allocator_type& __a)
229 : _M_ht(__x._M_ht, __a) { }
230
231public:
232 size_type size() const { return _M_ht.size(); }
233 size_type max_size() const { return _M_ht.max_size(); }
234 bool empty() const { return _M_ht.empty(); }
235 void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
236 iterator begin() { return _M_ht.begin(); }
237 iterator end() { return _M_ht.end(); }
238 const_iterator begin() const { return _M_ht.begin(); }
239 const_iterator end() const { return _M_ht.end(); }
240
241public:
243 { return _M_ht.insert_unique(__obj); }
244 template <class _InputIterator>
245 void insert(_InputIterator __f, _InputIterator __l)
246 { _M_ht.insert_unique(__f,__l); }
248 { return _M_ht.insert_unique_noresize(__obj); }
249
250 iterator find(const key_type& __key) { return _M_ht.find(__key); }
251 const_iterator find(const key_type& __key) const
252 {
253 return _M_ht.find(__key);
254 }
255
256 _Tp& operator[](const key_type& __key) {
257 iterator __it = _M_ht.find(__key);
258 if (__it == _M_ht.end())
259 {
260 // This must be two statements because some compilers (e.g. SunPro 5)
261 // get confused when constructing a temporary using the default
262 // constructor. (Calls destructor too many times.)
263
264 // MODIFIED BY ARTHUR
265 //_Tp v = _STLP_DEFAULT_CONSTRUCTED(_Tp);
266 return _M_ht._M_insert(_value_type(__key, _Tp())).second; // RETURN
267 }
268 else
269 return (*__it).second; // RETURN
270 }
271
272 size_type count(const key_type& __key) const { return _M_ht.count(__key); }
273
275 { return _M_ht.equal_range(__key); }
277 equal_range(const key_type& __key) const
278 { return _M_ht.equal_range(__key); }
279
280 size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
281 void erase(iterator __it) { _M_ht.erase(__it); }
282 void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
283 void clear() { _M_ht.clear(); }
284
285 void resize(size_type __hint) { _M_ht.resize(__hint); }
286 size_type bucket_count() const { return _M_ht.bucket_count(); }
287 size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
289 { return _M_ht.elems_in_bucket(__n); }
290 static bool _M_equal (const _Self& __x, const _Self& __y) {
291 return _Ht::_M_equal(__x._M_ht,__y._M_ht);
292 }
293};
294
295template <class _Key, class _Tp, class _HashFcn, class _EqualKey, class _Alloc>
296inline
302
303template <class _Key, class _Tp,
304 class _HashFcn =
305 typename ::BloombergLP::bslstp::HashSelector<_Key>::Type,
306 class _EqualKey = typename bsl::ComparatorSelector<_Key>::Type,
309{
310private:
312 typedef hashtable<_Ht_pair, _Key, _HashFcn,
313 select1st<_Ht_pair>, _EqualKey, _Alloc> _Ht;
315public:
316 typedef typename _Ht::key_type key_type;
317 typedef _Tp data_type;
318 typedef _Tp mapped_type;
319 typedef typename _Ht::value_type _value_type;
321 typedef typename _Ht::hasher hasher;
322 typedef typename _Ht::key_equal key_equal;
323
324 typedef typename _Ht::size_type size_type;
326 typedef typename _Ht::pointer pointer;
328 typedef typename _Ht::reference reference;
330
331 typedef typename _Ht::iterator iterator;
333
335
336 hasher hash_funct() const { return _M_ht.hash_funct(); }
337 key_equal key_eq() const { return _M_ht.key_eq(); }
338 allocator_type get_allocator() const { return _M_ht.get_allocator(); }
339
340private:
341 _Ht _M_ht;
342public:
343 hash_multimap() : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
345 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
347 : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
348
349 // Constructors with alternative allocator.
350 explicit hash_multimap(const allocator_type& __a)
351 : _M_ht(100, hasher(), key_equal(), __a) {}
353 : _M_ht(__n, hasher(), key_equal(), __a) {}
354 hash_multimap(size_type __n, const hasher& __hf, const allocator_type& __a)
355 : _M_ht(__n, __hf, key_equal(), __a) {}
356
357 hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
358 const allocator_type& __a = allocator_type())
359 : _M_ht(__n, __hf, __eql, __a) {}
360
361 template <class _InputIterator>
362 hash_multimap(_InputIterator __f, _InputIterator __l)
363 : _M_ht(100, hasher(), key_equal(), allocator_type())
364 { _M_ht.insert_equal(__f, __l); }
365 template <class _InputIterator>
366 hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
367 : _M_ht(__n, hasher(), key_equal(), allocator_type())
368 { _M_ht.insert_equal(__f, __l); }
369 template <class _InputIterator>
370 hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
371 const hasher& __hf)
372 : _M_ht(__n, __hf, key_equal(), allocator_type())
373 { _M_ht.insert_equal(__f, __l); }
374
375 // Constructors with alternative allocator.
376 template <class _InputIterator>
377 hash_multimap(_InputIterator __f, _InputIterator __l,
378 const allocator_type& __a)
379 : _M_ht(100, hasher(), key_equal(), __a)
380 { _M_ht.insert_equal(__f, __l); }
381 template <class _InputIterator>
382 hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
383 const allocator_type& __a)
384 : _M_ht(__n, hasher(), key_equal(), __a)
385 { _M_ht.insert_equal(__f, __l); }
386 template <class _InputIterator>
387 hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
388 const hasher& __hf, const allocator_type& __a)
389 : _M_ht(__n, __hf, key_equal(), __a)
390 { _M_ht.insert_equal(__f, __l); }
391
392 template <class _InputIterator>
393 hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
394 const hasher& __hf, const key_equal& __eql,
395 const allocator_type& __a = allocator_type())
396 : _M_ht(__n, __hf, __eql, __a)
397 { _M_ht.insert_equal(__f, __l); }
398
399
400 // Copy-construct with alternative allocator.
401 // NOTE: Default copy-constructor is generated by the compiler
402 hash_multimap(const _Self& __x, const allocator_type& __a)
403 : _M_ht(__x._M_ht, __a) { }
404
405public:
406 size_type size() const { return _M_ht.size(); }
407 size_type max_size() const { return _M_ht.max_size(); }
408 bool empty() const { return _M_ht.empty(); }
409 void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
410
411 iterator begin() { return _M_ht.begin(); }
412 iterator end() { return _M_ht.end(); }
413 const_iterator begin() const { return _M_ht.begin(); }
414 const_iterator end() const { return _M_ht.end(); }
415
416public:
418 { return _M_ht.insert_equal(__obj); }
419 template <class _InputIterator>
420 void insert(_InputIterator __f, _InputIterator __l)
421 { _M_ht.insert_equal(__f,__l); }
423 { return _M_ht.insert_equal_noresize(__obj); }
424
425 iterator find(const key_type& __key) { return _M_ht.find(__key); }
426 const_iterator find(const key_type& __key) const
427 { return _M_ht.find(__key); }
428
429 size_type count(const key_type& __key) const { return _M_ht.count(__key); }
430
432 { return _M_ht.equal_range(__key); }
434 equal_range(const key_type& __key) const
435 { return _M_ht.equal_range(__key); }
436
437 size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
438 void erase(iterator __it) { _M_ht.erase(__it); }
439 void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
440 void clear() { _M_ht.clear(); }
441
442public:
443 void resize(size_type __hint) { _M_ht.resize(__hint); }
444 size_type bucket_count() const { return _M_ht.bucket_count(); }
445 size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
447 { return _M_ht.elems_in_bucket(__n); }
448 static bool _M_equal (const _Self& __x, const _Self& __y) {
449 return _Ht::_M_equal(__x._M_ht,__y._M_ht);
450 }
451};
452
453template <class _Key, class _Tp, class _HashFcn, class _EqualKey, class _Alloc>
454inline
460
461template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
462inline
468
469template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
470inline
473 return !(__hm1 == __hm2);
474}
475
476template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
477inline
480{
481 return hash_multimap<_Key,
482 _Tp,
483 _HashFcn,
484 _EqlKey,
485 _Alloc>::_M_equal(__hm1, __hm2);
486}
487
488template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
489inline
492{
493 return !(__hm1 == __hm2);
494}
495
496} // close namespace bsl
497
498namespace std {
499
500// Specialization of insert_iterator so that it will work for hash_map
501// and hash_multimap.
502
503template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
504class insert_iterator<
505 bsl::hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> > {
506protected:
509public:
511 typedef output_iterator_tag iterator_category;
512 typedef void value_type;
513 typedef void difference_type;
514 typedef void pointer;
515 typedef void reference;
516
517 insert_iterator(_Container& __x) : container(&__x) {}
519 : container(&__x) {}
520 insert_iterator<_Container>&
521 operator=(const typename _Container::value_type& __val) {
522 container->insert(__val);
523 return *this;
524 }
525 insert_iterator<_Container>& operator*() { return *this; }
526 insert_iterator<_Container>& operator++() { return *this; }
527 insert_iterator<_Container>& operator++(int) { return *this; }
528};
529
530template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
531class insert_iterator<bsl::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> >
532{
533protected:
537public:
539 typedef output_iterator_tag iterator_category;
540 typedef void value_type;
541 typedef void difference_type;
542 typedef void pointer;
543 typedef void reference;
544
545 insert_iterator(_Container& __x) : container(&__x) {}
547 : container(&__x) {}
548 insert_iterator<_Container>&
549 operator=(const typename _Container::value_type& __val) {
550 container->insert(__val);
551 return *this;
552 }
553 insert_iterator<_Container>& operator*() { return *this; }
554 insert_iterator<_Container>& operator++() { return *this; }
555 insert_iterator<_Container>& operator++(int) { return *this; }
556};
557
558} // close namespace std
559
560// ============================================================================
561// TYPE TRAITS
562// ============================================================================
563
564// Type traits for STL *ordered* containers:
565//: o An ordered container defines STL iterators.
566//: o An ordered container uses 'bslma' allocators if the parameterized
567//: '_Alloc' is convertible from 'bslma::Allocator*'.
568
569
570
571namespace bslalg {
572
573template <class _Key,
574 class _Tp,
575 class _HashFcn,
576 class _EqualKey,
577 class _Alloc>
578struct HasStlIterators<bsl::hash_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> >
580{};
581
582template <class _Key,
583 class _Tp,
584 class _HashFcn,
585 class _EqualKey,
586 class _Alloc>
587struct HasStlIterators<bsl::hash_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> >
589{};
590
591} // close namespace bslalg
592
593namespace bslma {
594
595template <class _Key,
596 class _Tp,
597 class _HashFcn,
598 class _EqualKey,
599 class _Alloc>
600struct UsesBslmaAllocator<bsl::hash_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> >
601 : bsl::is_convertible<Allocator*, _Alloc>
602{};
603
604template <class _Key,
605 class _Tp,
606 class _HashFcn,
607 class _EqualKey,
608 class _Alloc>
609struct UsesBslmaAllocator<bsl::hash_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> >
610 : bsl::is_convertible<Allocator*, _Alloc>
611{};
612
613} // close namespace bslma
614
615
616
617#endif /* INCLUDED_BSLSTP_HASHMAP */
618
619// Local Variables:
620// mode:C++
621// End:
622
623/** @} */
624/** @} */
625/** @} */
Definition bslma_bslallocator.h:580
Definition bslstp_hashmap.h:136
_Ht::allocator_type allocator_type
Definition bslstp_hashmap.h:161
allocator_type get_allocator() const
Definition bslstp_hashmap.h:165
void erase(iterator __f, iterator __l)
Definition bslstp_hashmap.h:282
_Ht::difference_type difference_type
Definition bslstp_hashmap.h:152
_Ht::const_iterator const_iterator
Definition bslstp_hashmap.h:159
_Ht::reference reference
Definition bslstp_hashmap.h:155
size_type count(const key_type &__key) const
Definition bslstp_hashmap.h:272
hash_map(const allocator_type &__a)
Definition bslstp_hashmap.h:177
_Ht::value_type _value_type
Definition bslstp_hashmap.h:146
_Tp data_type
Definition bslstp_hashmap.h:144
const_iterator end() const
Definition bslstp_hashmap.h:239
void swap(_Self &__hs)
Definition bslstp_hashmap.h:235
hash_map(_InputIterator __f, _InputIterator __l, size_type __n, const allocator_type &__a)
Definition bslstp_hashmap.h:208
_Tp & operator[](const key_type &__key)
Definition bslstp_hashmap.h:256
size_type elems_in_bucket(size_type __n) const
Definition bslstp_hashmap.h:288
void insert(_InputIterator __f, _InputIterator __l)
Definition bslstp_hashmap.h:245
hash_map(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf, const allocator_type &__a)
Definition bslstp_hashmap.h:213
hash_map(_InputIterator __f, _InputIterator __l, const allocator_type &__a)
Definition bslstp_hashmap.h:204
const_iterator find(const key_type &__key) const
Definition bslstp_hashmap.h:251
iterator end()
Definition bslstp_hashmap.h:237
pair< iterator, bool > insert_noresize(const value_type &__obj)
Definition bslstp_hashmap.h:247
size_type bucket_count() const
Definition bslstp_hashmap.h:286
iterator begin()
Definition bslstp_hashmap.h:236
_Tp mapped_type
Definition bslstp_hashmap.h:145
hash_map(size_type __n, const allocator_type &__a)
Definition bslstp_hashmap.h:179
key_equal key_eq() const
Definition bslstp_hashmap.h:164
bool empty() const
Definition bslstp_hashmap.h:234
_Ht::size_type size_type
Definition bslstp_hashmap.h:151
pair< iterator, bool > insert(const value_type &__obj)
Definition bslstp_hashmap.h:242
_Ht::key_equal key_equal
Definition bslstp_hashmap.h:149
size_type size() const
Definition bslstp_hashmap.h:232
_Ht::pointer pointer
Definition bslstp_hashmap.h:153
hash_map(size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a=allocator_type())
Definition bslstp_hashmap.h:184
_Ht::hasher hasher
Definition bslstp_hashmap.h:148
hash_map(size_type __n, const hasher &__hf, const allocator_type &__a)
Definition bslstp_hashmap.h:181
pair< const_iterator, const_iterator > equal_range(const key_type &__key) const
Definition bslstp_hashmap.h:277
hash_map(size_type __n)
Definition bslstp_hashmap.h:171
hash_map(size_type __n, const hasher &__hf)
Definition bslstp_hashmap.h:173
hasher hash_funct() const
Definition bslstp_hashmap.h:163
size_type erase(const key_type &__key)
Definition bslstp_hashmap.h:280
size_type max_bucket_count() const
Definition bslstp_hashmap.h:287
void resize(size_type __hint)
Definition bslstp_hashmap.h:285
void erase(iterator __it)
Definition bslstp_hashmap.h:281
const_iterator begin() const
Definition bslstp_hashmap.h:238
_Ht::const_reference const_reference
Definition bslstp_hashmap.h:156
pair< iterator, iterator > equal_range(const key_type &__key)
Definition bslstp_hashmap.h:274
_Ht::iterator iterator
Definition bslstp_hashmap.h:158
void clear()
Definition bslstp_hashmap.h:283
hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
Definition bslstp_hashmap.h:193
hash_map(const _Self &__x, const allocator_type &__a)
Definition bslstp_hashmap.h:228
hash_map()
Definition bslstp_hashmap.h:170
iterator find(const key_type &__key)
Definition bslstp_hashmap.h:250
static bool _M_equal(const _Self &__x, const _Self &__y)
Definition bslstp_hashmap.h:290
hash_map(_InputIterator __f, _InputIterator __l)
Definition bslstp_hashmap.h:189
hash_map(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a=allocator_type())
Definition bslstp_hashmap.h:219
_Ht::key_type key_type
Definition bslstp_hashmap.h:143
size_type max_size() const
Definition bslstp_hashmap.h:233
_Ht::const_pointer const_pointer
Definition bslstp_hashmap.h:154
hash_map(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf)
Definition bslstp_hashmap.h:197
_Ht::value_type value_type
Definition bslstp_hashmap.h:147
Definition bslstp_hashmap.h:309
iterator end()
Definition bslstp_hashmap.h:412
size_type bucket_count() const
Definition bslstp_hashmap.h:444
bool empty() const
Definition bslstp_hashmap.h:408
_Ht::const_pointer const_pointer
Definition bslstp_hashmap.h:327
hash_multimap(size_type __n, const hasher &__hf)
Definition bslstp_hashmap.h:346
pair< const_iterator, const_iterator > equal_range(const key_type &__key) const
Definition bslstp_hashmap.h:434
hash_multimap(const _Self &__x, const allocator_type &__a)
Definition bslstp_hashmap.h:402
size_type count(const key_type &__key) const
Definition bslstp_hashmap.h:429
_Ht::hasher hasher
Definition bslstp_hashmap.h:321
hash_multimap(const allocator_type &__a)
Definition bslstp_hashmap.h:350
size_type max_size() const
Definition bslstp_hashmap.h:407
hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a=allocator_type())
Definition bslstp_hashmap.h:393
hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf)
Definition bslstp_hashmap.h:370
hasher hash_funct() const
Definition bslstp_hashmap.h:336
iterator begin()
Definition bslstp_hashmap.h:411
allocator_type get_allocator() const
Definition bslstp_hashmap.h:338
_Ht::size_type size_type
Definition bslstp_hashmap.h:324
const_iterator begin() const
Definition bslstp_hashmap.h:413
iterator find(const key_type &__key)
Definition bslstp_hashmap.h:425
_Ht::key_equal key_equal
Definition bslstp_hashmap.h:322
key_equal key_eq() const
Definition bslstp_hashmap.h:337
hash_multimap(size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a=allocator_type())
Definition bslstp_hashmap.h:357
pair< iterator, iterator > equal_range(const key_type &__key)
Definition bslstp_hashmap.h:431
_Tp data_type
Definition bslstp_hashmap.h:317
const_iterator end() const
Definition bslstp_hashmap.h:414
hash_multimap(size_type __n, const allocator_type &__a)
Definition bslstp_hashmap.h:352
const_iterator find(const key_type &__key) const
Definition bslstp_hashmap.h:426
void resize(size_type __hint)
Definition bslstp_hashmap.h:443
hash_multimap(size_type __n, const hasher &__hf, const allocator_type &__a)
Definition bslstp_hashmap.h:354
size_type max_bucket_count() const
Definition bslstp_hashmap.h:445
void swap(_Self &__hs)
Definition bslstp_hashmap.h:409
_Ht::reference reference
Definition bslstp_hashmap.h:328
_value_type value_type
Definition bslstp_hashmap.h:320
hash_multimap()
Definition bslstp_hashmap.h:343
hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf, const allocator_type &__a)
Definition bslstp_hashmap.h:387
_Ht::const_iterator const_iterator
Definition bslstp_hashmap.h:332
size_type elems_in_bucket(size_type __n) const
Definition bslstp_hashmap.h:446
_Ht::iterator iterator
Definition bslstp_hashmap.h:331
hash_multimap(_InputIterator __f, _InputIterator __l)
Definition bslstp_hashmap.h:362
size_type size() const
Definition bslstp_hashmap.h:406
_Ht::allocator_type allocator_type
Definition bslstp_hashmap.h:334
_Ht::difference_type difference_type
Definition bslstp_hashmap.h:325
hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n, const allocator_type &__a)
Definition bslstp_hashmap.h:382
_Ht::value_type _value_type
Definition bslstp_hashmap.h:319
_Ht::key_type key_type
Definition bslstp_hashmap.h:316
_Ht::pointer pointer
Definition bslstp_hashmap.h:326
size_type erase(const key_type &__key)
Definition bslstp_hashmap.h:437
iterator insert_noresize(const value_type &__obj)
Definition bslstp_hashmap.h:422
hash_multimap(_InputIterator __f, _InputIterator __l, const allocator_type &__a)
Definition bslstp_hashmap.h:377
hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
Definition bslstp_hashmap.h:366
void insert(_InputIterator __f, _InputIterator __l)
Definition bslstp_hashmap.h:420
static bool _M_equal(const _Self &__x, const _Self &__y)
Definition bslstp_hashmap.h:448
_Ht::const_reference const_reference
Definition bslstp_hashmap.h:329
_Tp mapped_type
Definition bslstp_hashmap.h:318
hash_multimap(size_type __n)
Definition bslstp_hashmap.h:344
iterator insert(const value_type &__obj)
Definition bslstp_hashmap.h:417
void clear()
Definition bslstp_hashmap.h:440
void erase(iterator __it)
Definition bslstp_hashmap.h:438
void erase(iterator __f, iterator __l)
Definition bslstp_hashmap.h:439
Definition bslstp_hashtable.h:230
hasher hash_funct() const
Definition bslstp_hashtable.h:247
_HF hasher
Definition bslstp_hashtable.h:236
value_type & reference
Definition bslstp_hashtable.h:243
ptrdiff_t difference_type
Definition bslstp_hashtable.h:240
allocator_type get_allocator() const
Definition bslstp_hashtable.h:281
_Key key_type
Definition bslstp_hashtable.h:234
static bool _M_equal(const hashtable< _Val, _Key, _HF, _ExK, _EqK, _All > &, const hashtable< _Val, _Key, _HF, _ExK, _EqK, _All > &)
Definition bslstp_hashtable.h:703
key_equal key_eq() const
Definition bslstp_hashtable.h:248
value_type * pointer
Definition bslstp_hashtable.h:241
const value_type & const_reference
Definition bslstp_hashtable.h:244
_EqK key_equal
Definition bslstp_hashtable.h:237
_Val value_type
Definition bslstp_hashtable.h:235
const value_type * const_pointer
Definition bslstp_hashtable.h:242
size_t size_type
Definition bslstp_hashtable.h:239
_Alloc_traits< _Val, _All >::allocator_type allocator_type
Definition bslstp_hashtable.h:280
Definition bslstl_pair.h:1210
insert_iterator< _Container > & operator++()
Definition bslstp_hashmap.h:526
insert_iterator< _Container > & operator=(const typename _Container::value_type &__val)
Definition bslstp_hashmap.h:521
insert_iterator(_Container &__x, typename _Container::iterator)
Definition bslstp_hashmap.h:518
insert_iterator(_Container &__x)
Definition bslstp_hashmap.h:517
insert_iterator< _Container > & operator++(int)
Definition bslstp_hashmap.h:527
insert_iterator< _Container > & operator*()
Definition bslstp_hashmap.h:525
bsl::hash_map< _Key, _Tp, _HashFn, _EqKey, _Alloc > _Container
Definition bslstp_hashmap.h:507
output_iterator_tag iterator_category
Definition bslstp_hashmap.h:511
output_iterator_tag iterator_category
Definition bslstp_hashmap.h:539
insert_iterator< _Container > & operator=(const typename _Container::value_type &__val)
Definition bslstp_hashmap.h:549
bsl::hash_multimap< _Key, _Tp, _HashFn, _EqKey, _Alloc > _Container
Definition bslstp_hashmap.h:534
insert_iterator< _Container > & operator++()
Definition bslstp_hashmap.h:554
insert_iterator(_Container &__x, typename _Container::iterator)
Definition bslstp_hashmap.h:546
insert_iterator< _Container > & operator*()
Definition bslstp_hashmap.h:553
insert_iterator< _Container > & operator++(int)
Definition bslstp_hashmap.h:555
Definition bdlb_printmethods.h:283
Definition bdlc_flathashmap.h:1805
Definition balxml_encoderoptions.h:68
Definition bdldfp_decimal.h:5188
Definition bslstp_hashtable.h:146
Definition bslstl_equalto.h:311
Definition bslmf_isconvertible.h:867
public type names
Definition bslstp_exfunctional.h:211
Definition bslalg_hasstliterators.h:99
Definition bslma_usesbslmaallocator.h:343