2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
7 <title>basic_assoc_cntnr Interface
22 <p>A basic associative container specialized for the "multimap" case.
27 <a href = "../../../../include/ext/pb_assoc/assoc_cntnr.hpp"><tt>assoc_cntnr.hpp</tt>
33 <a href = "#link1">Template parameters.
39 Public Types and Constants:
44 <a href = "#link2">General container definitions.
50 <a href = "#link3">Categories.
56 <a href = "#link4">Policy definitions.
62 <a href = "#link5">Key-type definitions.
68 <a href = "#link6">Data-type definitions.
74 <a href = "#link7">Value-type definitions.
80 <a href = "#link8">Iterator definitions.
86 <a href = "#link9">Mapping-level definitions.
101 <a href = "#link10">Constructors, destructor, and related.
107 <a href = "#link11">Information methods.
113 <a href = "#link12">Insert methods.
119 <a href = "#link13">Find methods.
125 <a href = "#link14">Erase methods.
131 <a href = "#link15">Iteration methods.
144 <a name = "link1">Template parameters.
149 <table WIDTH = "100%" BORDER = "1">
150 <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>
155 <pre><a name = "Key3735928856">Key</a></pre>
176 <pre><a name = "Cntnr3735929076">Cntnr</a></pre>
182 <p>(Associative) container to which each data is mapped.</p>
197 <pre><a name = "DS_Tag3735929089">DS_Tag</a></pre>
203 <p>Data structure tag.</p>
218 <pre><a name = "Policy_Tl3735929470">Policy_Tl</a></pre>
224 <p>Policy typelist.</p>
239 <pre><a name = "Allocator3735929488">Allocator</a></pre>
245 <p>Allocator type.</p>
261 <a name = "link2">General container definitions.
266 <table WIDTH = "100%" BORDER = "1">
267 <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>
272 <pre><a name = "size_type3735929547">size_type</a></pre>
278 <pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::size_type</pre>
293 <pre><a name = "difference_type3735930139">difference_type</a></pre>
299 <pre><b>typename</b> <a href = "#Allocator3735929488">Allocator</a>::difference_type</pre>
305 <p>Difference type.</p>
315 <a name = "link3">Categories.
320 <table WIDTH = "100%" BORDER = "1">
321 <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>
326 <pre><a name = "ds_category3735929731">ds_category</a></pre>
332 <pre><a href = "#DS_Tag3735929089">DS_Tag</a></pre>
338 <p>The underlying data-structure tag of the container. comment = </p>
347 <pre><a name = "ms_category3735929740">ms_category</a></pre>
353 <pre><a href = "compound_data_enabled_ms_tag.html"><tt>compound_data_enabled_ms_tag</tt></a></pre>
359 <p>The mapping-semantics category of the container. override_from = </p>
369 <a name = "link4">Policy definitions.
374 <table WIDTH = "100%" BORDER = "1">
375 <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>
380 <pre><a name = "allocator3735929520">allocator</a></pre>
386 <pre><a href = "#Allocator3735929488">Allocator</a></pre>
392 <p>Allocator type.</p>
402 <a name = "link5">Key-type definitions.
407 <table WIDTH = "100%" BORDER = "1">
408 <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>
413 <pre><a name = "key_type3735929433">key_type</a></pre>
419 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
420 <a href = "#Key3735928856">Key</a>>::other::value_type</pre>
435 <pre><a name = "key_reference3735929926">key_reference</a></pre>
441 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
442 <a href = "#Key3735928856">Key</a>>::other::reference</pre>
448 <p>Key reference type.</p>
457 <pre><a name = "const_key_reference3735929552">const_key_reference</a></pre>
463 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
464 <a href = "#Key3735928856">Key</a>>::other::const_reference</pre>
470 <p>Const key reference type.</p>
479 <pre><a name = "key_pointer3735929752">key_pointer</a></pre>
485 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
486 <a href = "#Key3735928856">Key</a>>::other::pointer</pre>
492 <p>Key pointer type.</p>
501 <pre><a name = "const_key_pointer3735929445">const_key_pointer</a></pre>
507 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
508 <a href = "#Key3735928856">Key</a>>::other::const_pointer</pre>
514 <p>Const key pointer type.</p>
524 <a name = "link6">Data-type definitions.
529 <table WIDTH = "100%" BORDER = "1">
530 <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>
535 <pre><a name = "data_type3735929514">data_type</a></pre>
541 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
542 <a href = "#Cntnr3735929076">Cntnr</a>>::other::value_type</pre>
557 <pre><a name = "data_reference3735930007">data_reference</a></pre>
563 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
564 <a href = "#Cntnr3735929076">Cntnr</a>>::other::reference</pre>
570 <p>Data reference type.</p>
579 <pre><a name = "const_data_reference3735929597">const_data_reference</a></pre>
585 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
586 <a href = "#Cntnr3735929076">Cntnr</a>>::other::const_reference</pre>
592 <p>Const data reference type.</p>
601 <pre><a name = "data_pointer3735929833">data_pointer</a></pre>
607 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
608 <a href = "#Cntnr3735929076">Cntnr</a>>::other::pointer</pre>
614 <p>Data pointer type.</p>
623 <pre><a name = "const_data_pointer3735929517">const_data_pointer</a></pre>
629 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::<b>template</b> rebind<
630 <a href = "#Cntnr3735929076">Cntnr</a>>::other::const_pointer</pre>
636 <p>Const data pointer type.</p>
646 <a name = "link7">Value-type definitions.
651 <p><p>Types pertaining to the <b>domain</b> of the relationships of the table.</p> <p>This is explained in <a href = "concepts.html#concepts_types">Data Types, Value Types, Mapped Data Types, and Mapped Value Types</a> and <a href = "non_unique_mapping.html#types">Mapped Data Types and Mapped Value Types</a>.</p></p>
654 <table WIDTH = "100%" BORDER = "1">
655 <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>
660 <pre><a name = "value_type3735929645">value_type</a></pre>
666 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind<
667 std::pair<<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>>::other::value_type</pre>
682 <pre><a name = "reference3735929502">reference</a></pre>
688 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind<
689 std::pair<<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>>::other::reference</pre>
695 <p>Value reference type.</p>
704 <pre><a name = "const_reference3735930148">const_reference</a></pre>
710 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind<
711 std::pair<<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>>::other::const_reference</pre>
717 <p>Const value reference type.</p>
726 <pre><a name = "pointer3735929328">pointer</a></pre>
732 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind<
733 std::pair<<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>>::other::pointer</pre>
739 <p>Value pointer type.</p>
748 <pre><a name = "const_pointer3735929974">const_pointer</a></pre>
754 <pre><b>typename</b> <a href = "#allocator3735929520">allocator</a>::rebind<
755 std::pair<<b>const</b> <a href = "#key_type3735929433">key_type</a>, <a href = "#Cntnr3735929076">Cntnr</a>>::other::const_pointer</pre>
761 <p>Const Value pointer type.</p>
771 <a name = "link8">Iterator definitions.
776 <table WIDTH = "100%" BORDER = "1">
777 <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>
782 <pre><a name = "const_find_iterator3735929537">const_find_iterator</a></pre>
788 <pre>Underlying data-structure's const find-type iterator.</pre>
794 <p>Const find-type iterator.</p>
803 <pre><a name = "find_iterator3735929945">find_iterator</a></pre>
809 <pre>Underlying data-structure's find-type iterator.</pre>
815 <p>Find-type iterator.</p>
824 <pre><a name = "const_iterator3735930079">const_iterator</a></pre>
830 <pre>Underlying data-structure's const range-type iterator.</pre>
836 <p>Const range-type iterator.</p>
845 <pre><a name = "iterator3735929433">iterator</a></pre>
851 <pre>Underlying data-structure's range-type iterator.</pre>
857 <p>Range-type iterator.</p>
867 <a name = "link9">Mapping-level definitions.
872 <p>See <a href = "ms_gen.html">Mapping-Semantics</a>.</p>
876 <a name = "link10">Constructors, destructor, and related.
881 <table WIDTH = "100%" BORDER = "1">
882 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
905 <a name = "link11">Information methods.
910 <table WIDTH = "100%" BORDER = "1">
911 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
916 <pre><b>inline</b> <a href = "#size_type3735929547">size_type</a>
918 () <b>const</b></pre>
924 <p>Returns the number of distinct <a href = "#value_type3735929645"><tt>value_type</tt></a> objects the container object is storing.</p>
933 <pre><b>inline</b> <a href = "#size_type3735929547">size_type</a>
935 () <b>const</b></pre>
941 <p>Returns an upper bound on the number of distinct <a href = "#value_type3735929645"><tt>value_type</tt></a> objects this container can store.</p>
950 <pre><b>inline</b> <b>bool</b>
952 () <b>const</b></pre>
958 <p>Returns whether the container object is not storing any <a href = "#value_type3735929645"><tt>value_type</tt></a> objects.</p>
967 <pre><b>inline</b> static <a href = "#const_key_reference3735929552">const_key_reference</a>
969 (<a href = "#const_reference3735930148">const_reference</a> r_val)</pre>
975 <p>Extracts a key from a <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
985 <a name = "link12">Insert methods.
990 <table WIDTH = "100%" BORDER = "1">
991 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
996 <pre><b>inline</b> std::pair<<a href = "#find_iterator3735929945">find_iterator</a>, <b>bool</b>>
998 (<a href = "#const_reference3735930148">const_reference</a> r_val)</pre>
1004 <p>Inserts a <a href = "#value_type3735929645"><tt>value_type</tt></a> object. If no <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_val</tt></font>'s key was in the container object, inserts and returns (<a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> object associated with <font color = "#666666"><tt>r_val</tt></font>, <tt><b>true</b></tt>); otherwise just returns (<a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> object associated with <font color = "#666666"><tt>r_val</tt></font>'s key, <tt><b>false</b></tt>).</p>
1013 <pre><b>inline</b> <a href = "#data_reference3735930007">data_reference</a>
1015 (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
1021 <p>Inserts (if necessary) a <a href = "#value_type3735929645"><tt>value_type</tt></a> object associated with <font color = "#666666"><tt>r_key</tt></font>. Returns a <a href = "#data_reference3735930007"><tt>data_reference</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font></p>
1031 <a name = "link13">Find methods.
1036 <table WIDTH = "100%" BORDER = "1">
1037 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
1042 <pre><b>inline</b> <a href = "#find_iterator3735929945">find_iterator</a>
1044 (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
1050 <p>Returns the <a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> corresponding to the <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_key</tt></font> as its key, or the <a href = "#find_iterator3735929945"><tt>find_iterator</tt></a> corresponding to the just-after-last entry if no such <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
1059 <pre><b>inline</b> <a href = "#const_find_iterator3735929537">const_find_iterator</a>
1061 (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key) <b>const</b></pre>
1067 <p>Returns the <a href = "#const_find_iterator3735929537"><tt>const_find_iterator</tt></a> corresponding to the <a href = "#value_type3735929645"><tt>value_type</tt></a> with <font color = "#666666"><tt>r_key</tt></font> as its key, or the <a href = "#const_find_iterator3735929537"><tt>const_find_iterator</tt></a> corresponding to the just-after-last entry if no such <a href = "#value_type3735929645"><tt>value_type</tt></a>.</p>
1076 <pre><b>inline</b> <a href = "#const_data_reference3735929597">const_data_reference</a>
1078 (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key) <b>const</b></pre>
1084 <p>Inserts (if necessary) a <a href = "#value_type3735929645"><tt>value_type</tt></a> object associated with <font color = "#666666"><tt>r_key</tt></font>. Returns a <a href = "#data_reference3735930007"><tt>data_reference</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font></p>
1094 <a name = "link14">Erase methods.
1099 <table WIDTH = "100%" BORDER = "1">
1100 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
1105 <pre><b>inline</b> <a href = "#size_type3735929547">size_type</a>
1107 (<a href = "#const_key_reference3735929552">const_key_reference</a> r_key)</pre>
1113 <p>Erases the <a href = "#value_type3735929645"><tt>value_type</tt></a> associated with <font color = "#666666"><tt>r_key</tt></font>; returns the number of <a href = "#value_type3735929645"><tt>value_type</tt></a>s erased (0 or 1).</p>
1122 <pre><b>template</b><
1123 <b>class</b> Pred>
1124 <b>inline</b> <a href = "#size_type3735929547">size_type</a>
1132 <p>Erases any <a href = "#value_type3735929645"><tt>value_type</tt></a> satisfying the predicate <font color = "#666666"><tt>prd</tt></font> (this is transactional, either all matching <a href = "#value_type3735929645"><tt>value_type</tt></a>s are erased, or, if an exception is thrown (for types whose erase can throw an exception) none); returns the number of <a href = "#value_type3735929645"><tt>value_type</tt></a>s erased.</p>
1149 <p>Clears the container object.</p>
1159 <a name = "link15">Iteration methods.
1164 <table WIDTH = "100%" BORDER = "1">
1165 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
1170 <pre><b>inline</b> <a href = "#iterator3735929433">iterator</a>
1178 <p>Returns an <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the first <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
1187 <pre><b>inline</b> <a href = "#const_iterator3735930079">const_iterator</a>
1189 () <b>const</b></pre>
1195 <p>Returns a <a href = "#const_iterator3735930079"><tt>const_iterator</tt></a> corresponding to the first <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
1204 <pre><b>inline</b> <a href = "#iterator3735929433">iterator</a>
1212 <p>Returns an <a href = "#iterator3735929433"><tt>iterator</tt></a> corresponding to the just-after_last <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>
1221 <pre><b>inline</b> <a href = "#const_iterator3735930079">const_iterator</a>
1223 () <b>const</b></pre>
1229 <p>Returns a <a href = "#const_iterator3735930079"><tt>const_iterator</tt></a> corresponding to the just-after_last <a href = "#value_type3735929645"><tt>value_type</tt></a> in the container.</p>