2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
7 <title>gp_hash_assoc_cntnr Interface
14 <tt>gp_hash_assoc_cntnr
22 <p>A general-probing hash-based associative container.
27 <a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
33 <a href = "#link1">Template parameters.
39 <a href = "#link2">Base classes.
45 Public Types and Constants:
50 <a href = "#link3">Policy definitions.
65 <a href = "#link4">Constructors, destructor, and related.
71 <a href = "#link5">Policy access methods.
84 <a name = "link1">Template parameters.
89 <table WIDTH = "100%" BORDER = "1">
90 <TR><TD Width = "20%" ALIGN = "left"><b>Parameter</b></TD><TD Width = "50%" ALIGN = "left"><b>Description</b></TD><TD Width = "30%" ALIGN = "left"><b>Default Value</b></TD></TR>
95 <pre><a name = "Key3735928856">Key</a></pre>
116 <pre><a name = "Data3735928937">Data</a></pre>
137 <pre><a name = "Hash_Fn3735929222">Hash_Fn</a></pre>
149 <pre>__gnu_cxx::hash<<a href = "#Key3735928856">Key</a>></pre>if using gcc;<pre>stdext::hash_value<<a href = "#Key3735928856">Key</a>></pre>if using Visual C++ .net
158 <pre><a name = "Eq_Fn3735929016">Eq_Fn</a></pre>
164 <p>Equivalence functor.</p>
170 <pre>std::equal_to<<a href = "#Key3735928856">Key</a>></pre>
179 <pre><a name = "Comb_Probe_Fn3735929818">Comb_Probe_Fn</a></pre>
185 <p>Combining probe functor.</p>
188 <p>If <a href = "#Hash_Fn3735929222">Hash_Fn</a> is <a href = "null_hash_fn.html"><tt>null_hash_fn</tt></a>, and <a href = "#Probe_Fn3735929338">Probe_Fn</a> is <a href = "comb_probe_fn.html"><tt>comb_probe_fn</tt></a>, then this is the <a href = "concepts.html#concepts_hash_fns">ranged_hash function</a> functor; otherwise, this is the <a href = "concepts.html#concepts_hash_fns">range_hashing function</a> functor;</p>
194 <pre><a href = "direct_mask_range_hashing.html">direct_mask_range_hashing</a><
195 <a href = "#Allocator3735929488">Allocator</a>></pre>
204 <pre><a name = "Probe_Fn3735929338">Probe_Fn</a></pre>
210 <p>Probe functor.</p>
216 If <tt><a href = "#comb_hash_fn3735929798">comb_hash_fn</a></tt> is <tt><a href = "direct_mask_range_hashing.html">direct_mask_range_hashing<></a></tt>, then <pre><a href = "linear_probe_fn.html">linear_probe_fn</a><
217 <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type></pre>otherwise, <pre><a href = "quadratic_probe_fn.html">quadratic_probe_fn</a><
218 <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type></pre>
227 <pre><a name = "Resize_Policy3735929904">Resize_Policy</a></pre>
233 <p>Resize policy.</p>
239 If <tt><a href = "#comb_hash_fn3735929798">comb_hash_fn</a></tt> is <tt><a href = "direct_mask_range_hashing.html">direct_mask_range_hashing<></a></tt>, then <pre><a href = "hash_standard_resize_policy.html">hash_standard_resize_policy</a><
240 <a href = "hash_exponential_size_policy.html">hash_exponential_size_policy</a><
241 <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type>,
242 <a href = "hash_load_check_resize_trigger.html">hash_load_check_resize_trigger</a><
243 <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type>,
245 <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type></pre>otherwise, <pre><a href = "hash_standard_resize_policy.html">hash_standard_resize_policy</a><
246 <a href = "hash_exponential_size_policy.html"><tt>hash_prime_size_policy</tt></a><
247 <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type>,
248 <a href = "hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a><
249 <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type>,
251 <b>typename</b> <a href = "#comb_hash_fn3735929798">comb_hash_fn</a>::size_type></pre>
260 <pre><a name = "Store_Hash3735929567">Store_Hash</a></pre>
266 <p>Indicates whether the hash value will be stored along with each key.</p>
269 <p>If <tt><a href = "#hash_fn3735929286">hash_fn</a></tt> is <tt><a href = "null_hash_fn.html">null_hash_fn</a></tt>, then the container will not compile if this value is <tt><b>true</b></tt></p>
275 <pre><tt><b>false</b></tt></pre>
284 <pre><a name = "Allocator3735929488">Allocator</a></pre>
290 <p>Allocator type.</p>
296 <pre>std::allocator<<b>char</b>></pre>
306 <a name = "link2">Base classes.
311 <table WIDTH = "100%" BORDER = "1">
312 <TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
317 <pre><a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a></pre>
332 <pre><a href = "#Probe_Fn3735929338">Probe_Fn</a></pre>
347 <pre><a href = "basic_hash_assoc_cntnr.html"<tt>basic_hash_assoc_cntnr</tt></a></pre>
363 <a name = "link3">Policy definitions.
368 <table WIDTH = "100%" BORDER = "1">
369 <TR><TD Width = "30%" ALIGN = "left"><b>Type</b></TD><TD Width = "55%" ALIGN = "left"><b>Definition</b></TD><TD Width = "15%" ALIGN = "left"><b>Description</b></TD></TR>
374 <pre><a name = "comb_probe_fn3735929914">comb_probe_fn</a></pre>
380 <pre><a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a></pre>
386 <p>Combining probe functor type.</p>
395 <pre><a name = "probe_fn3735929402">probe_fn</a></pre>
401 <pre><a href = "#Probe_Fn3735929338">Probe_Fn</a></pre>
407 <p>Probe functor type.</p>
417 <a name = "link4">Constructors, destructor, and related.
422 <table WIDTH = "100%" BORDER = "1">
423 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
428 <pre> gp_hash_assoc_cntnr
435 <p>Default constructor.</p>
444 <pre> gp_hash_assoc_cntnr
445 (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn)</pre>
451 <p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object.</p>
460 <pre> gp_hash_assoc_cntnr
461 (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn,
462 <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &r_eq_fn)</pre>
468 <p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object.</p>
477 <pre> gp_hash_assoc_cntnr
478 (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn,
479 <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &r_eq_fn,
480 <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &r_comb_probe_fn)</pre>
486 <p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object.</p>
495 <pre> gp_hash_assoc_cntnr
496 (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn,
497 <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &r_eq_fn,
498 <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &r_comb_probe_fn,
499 <b>const</b> <a href = "#Probe_Fn3735929338">Probe_Fn</a> &r_probe_fn)</pre>
505 <p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_probe_fn</tt></font> will be copied by the <a href = "#Probe_Fn3735929338"><tt>Probe_Fn</tt></a> object of the container object.</p>
514 <pre> gp_hash_assoc_cntnr
515 (<b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn,
516 <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &r_eq_fn,
517 <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &r_comb_probe_fn,
518 <b>const</b> <a href = "#Probe_Fn3735929338">Probe_Fn</a> &r_probe_fn,
519 <b>const</b> <a href = "#Resize_Policy3735929904">Resize_Policy</a> &r_resize_policy)</pre>
525 <p>Constructor taking some policy objects. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_probe_fn</tt></font> will be copied by the <a href = "#Probe_Fn3735929338"><tt>Probe_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_resize_policy</tt></font> will be copied by the <a href = "#Resize_Policy3735929904"><tt>Resize_Policy</tt></a> object of the container object.</p>
534 <pre><b>template</b><
544 <p>Constructor taking iterators to a range of value_types. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object.</p>
553 <pre><b>template</b><
558 <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn)</pre>
564 <p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object.</p>
573 <pre><b>template</b><
578 <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn,
579 <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &r_eq_fn)</pre>
585 <p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object.</p>
594 <pre><b>template</b><
599 <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn,
600 <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &r_eq_fn,
601 <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &r_comb_probe_fn)</pre>
607 <p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object.</p>
616 <pre><b>template</b><
621 <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn,
622 <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &r_eq_fn,
623 <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &r_comb_probe_fn,
624 <b>const</b> <a href = "#Probe_Fn3735929338">Probe_Fn</a> &r_probe_fn)</pre>
630 <p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_probe_fn</tt></font> will be copied by the <a href = "#Probe_Fn3735929338"><tt>Probe_Fn</tt></a> object of the container object.</p>
639 <pre><b>template</b><
644 <b>const</b> <a href = "#Hash_Fn3735929222">Hash_Fn</a> &r_hash_fn,
645 <b>const</b> <a href = "#Eq_Fn3735929016">Eq_Fn</a> &r_eq_fn,
646 <b>const</b> <a href = "#Comb_Probe_Fn3735929818">Comb_Probe_Fn</a> &r_comb_probe_fn,
647 <b>const</b> <a href = "#Probe_Fn3735929338">Probe_Fn</a> &r_probe_fn,
648 <b>const</b> <a href = "#Resize_Policy3735929904">Resize_Policy</a> &r_resize_policy)</pre>
654 <p>Constructor taking iterators to a range of value_types and some policy objects. The value_types between <font color = "#666666"><tt>first_it</tt></font> and <font color = "#666666"><tt>last_it</tt></font> will be inserted into the container object. <font color = "#666666"><tt>r_hash_fn</tt></font> will be copied by the <a href = "#Hash_Fn3735929222"><tt>Hash_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_eq_fn</tt></font> will be copied by the <a href = "#Eq_Fn3735929016"><tt>Eq_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_comb_probe_fn</tt></font> will be copied by the <a href = "#Comb_Probe_Fn3735929818"><tt>Comb_Probe_Fn</tt></a> object of the container object, <font color = "#666666"><tt>r_probe_fn</tt></font> will be copied by the <a href = "#Probe_Fn3735929338"><tt>Probe_Fn</tt></a> object of the container object, and <font color = "#666666"><tt>r_resize_policy</tt></font> will be copied by the <a href = "#Resize_Policy3735929904"><tt>Resize_Policy</tt></a> object of the container object.</p>
663 <pre> gp_hash_assoc_cntnr
664 (<b>const</b> <font color = "olive">gp_hash_assoc_cntnr</font> &r_other)</pre>
670 <p>Copy constructor.</p>
696 <pre><font color = "olive">gp_hash_assoc_cntnr</font> &
698 (<b>const</b> <font color = "olive">gp_hash_assoc_cntnr</font> &r_other)</pre>
704 <p>Assignment operator.</p>
715 (<font color = "olive">gp_hash_assoc_cntnr</font> &r_other)</pre>
721 <p>Swaps content.</p>
731 <a name = "link5">Policy access methods.
736 <table WIDTH = "100%" BORDER = "1">
737 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
742 <pre><a href = "#comb_probe_fn3735929914">comb_probe_fn</a> &
750 <p>Access to the <a href = "#comb_probe_fn3735929914"><tt>comb_probe_fn</tt></a> object.</p>
759 <pre><b>const</b> <a href = "#comb_probe_fn3735929914">comb_probe_fn</a> &
761 () <b>const</b></pre>
767 <p>Const access to the <a href = "#comb_probe_fn3735929914"><tt>comb_probe_fn</tt></a> object.</p>
776 <pre><a href = "#probe_fn3735929402">probe_fn</a> &
784 <p>Access to the <a href = "#probe_fn3735929402"><tt>probe_fn</tt></a> object.</p>
793 <pre><b>const</b> <a href = "#probe_fn3735929402">probe_fn</a> &
795 () <b>const</b></pre>
801 <p>Const access to the <a href = "#probe_fn3735929402"><tt>probe_fn</tt></a> object.</p>