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
"map
" 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.
95 <a href =
"#link9">Constructors, destructor, and related.
101 <a href =
"#link10">Information methods.
107 <a href =
"#link11">Insert methods.
113 <a href =
"#link12">Find methods.
119 <a href =
"#link13">Erase methods.
125 <a href =
"#link14">Iteration methods.
138 <a name =
"link1">Template parameters.
143 <table WIDTH =
"100%" BORDER =
"1">
144 <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>
149 <pre><a name =
"Key3735928856">Key
</a></pre>
170 <pre><a name =
"Data3735928937">Data
</a></pre>
191 <pre><a name =
"DS_Tag3735929089">DS_Tag
</a></pre>
197 <p>Data structure tag.
</p>
212 <pre><a name =
"Policy_Tl3735929470">Policy_Tl
</a></pre>
218 <p>Policy typelist.
</p>
233 <pre><a name =
"Allocator3735929488">Allocator
</a></pre>
239 <p>Allocator type.
</p>
255 <a name =
"link2">General container definitions.
260 <table WIDTH =
"100%" BORDER =
"1">
261 <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>
266 <pre><a name =
"size_type3735929547">size_type
</a></pre>
272 <pre><b>typename
</b> <a href =
"#Allocator3735929488">Allocator
</a>::size_type
</pre>
287 <pre><a name =
"difference_type3735930139">difference_type
</a></pre>
293 <pre><b>typename
</b> <a href =
"#Allocator3735929488">Allocator
</a>::difference_type
</pre>
299 <p>Difference type.
</p>
309 <a name =
"link3">Categories.
314 <table WIDTH =
"100%" BORDER =
"1">
315 <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>
320 <pre><a name =
"ds_category3735929731">ds_category
</a></pre>
326 <pre><a href =
"#DS_Tag3735929089">DS_Tag
</a></pre>
332 <p>The underlying data-structure tag of the container. comment =
</p>
341 <pre><a name =
"ms_category3735929740">ms_category
</a></pre>
347 <pre><a href =
"data_enabled_ms_tag.html"><tt>data_enabled_ms_tag
</tt></a></pre>
353 <p>The mapping-semantics category of the container.
</p>
363 <a name =
"link4">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 =
"allocator3735929520">allocator
</a></pre>
380 <pre><a href =
"#Allocator3735929488">Allocator
</a></pre>
386 <p>Allocator type.
</p>
396 <a name =
"link5">Key-type definitions.
401 <table WIDTH =
"100%" BORDER =
"1">
402 <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>
407 <pre><a name =
"key_type3735929433">key_type
</a></pre>
413 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
414 <a href =
"#Key3735928856">Key
</a>>::other::value_type
</pre>
429 <pre><a name =
"key_reference3735929926">key_reference
</a></pre>
435 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
436 <a href =
"#Key3735928856">Key
</a>>::other::reference
</pre>
442 <p>Key reference type.
</p>
451 <pre><a name =
"const_key_reference3735929552">const_key_reference
</a></pre>
457 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
458 <a href =
"#Key3735928856">Key
</a>>::other::const_reference
</pre>
464 <p>Const key reference type.
</p>
473 <pre><a name =
"key_pointer3735929752">key_pointer
</a></pre>
479 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
480 <a href =
"#Key3735928856">Key
</a>>::other::pointer
</pre>
486 <p>Key pointer type.
</p>
495 <pre><a name =
"const_key_pointer3735929445">const_key_pointer
</a></pre>
501 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
502 <a href =
"#Key3735928856">Key
</a>>::other::const_pointer
</pre>
508 <p>Const key pointer type.
</p>
518 <a name =
"link6">Data-type definitions.
523 <table WIDTH =
"100%" BORDER =
"1">
524 <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>
529 <pre><a name =
"data_type3735929514">data_type
</a></pre>
535 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
536 <a href =
"#Data3735928937">Data
</a>>::other::value_type
</pre>
551 <pre><a name =
"data_reference3735930007">data_reference
</a></pre>
557 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
558 <a href =
"#Data3735928937">Data
</a>>::other::reference
</pre>
564 <p>Data reference type.
</p>
573 <pre><a name =
"const_data_reference3735929597">const_data_reference
</a></pre>
579 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
580 <a href =
"#Data3735928937">Data
</a>>::other::const_reference
</pre>
586 <p>Const data reference type.
</p>
595 <pre><a name =
"data_pointer3735929833">data_pointer
</a></pre>
601 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
602 <a href =
"#Data3735928937">Data
</a>>::other::pointer
</pre>
608 <p>Data pointer type.
</p>
617 <pre><a name =
"const_data_pointer3735929517">const_data_pointer
</a></pre>
623 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
624 <a href =
"#Data3735928937">Data
</a>>::other::const_pointer
</pre>
630 <p>Const data pointer type.
</p>
640 <a name =
"link7">Value-type definitions.
645 <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>
648 <table WIDTH =
"100%" BORDER =
"1">
649 <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>
654 <pre><a name =
"value_type3735929645">value_type
</a></pre>
660 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
661 std::pair
<<b>const
</b> <a href =
"#key_type3735929433">key_type
</a>,
<a href =
"#data_type3735929514">data_type
</a>> >::other::value_type
</pre>
676 <pre><a name =
"reference3735929502">reference
</a></pre>
682 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
683 std::pair
<<b>const
</b> <a href =
"#key_type3735929433">key_type
</a>,
<a href =
"#data_type3735929514">data_type
</a>> >::other::reference
</pre>
689 <p>Value reference type.
</p>
698 <pre><a name =
"const_reference3735930148">const_reference
</a></pre>
704 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
705 std::pair
<<b>const
</b> <a href =
"#key_type3735929433">key_type
</a>,
<a href =
"#data_type3735929514">data_type
</a>> >::other::const_reference
</pre>
711 <p>Const value reference type.
</p>
720 <pre><a name =
"pointer3735929328">pointer
</a></pre>
726 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
727 std::pair
<<b>const
</b> <a href =
"#key_type3735929433">key_type
</a>,
<a href =
"#data_type3735929514">data_type
</a>> >::other::pointer
</pre>
733 <p>Value pointer type.
</p>
742 <pre><a name =
"const_pointer3735929974">const_pointer
</a></pre>
748 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
749 std::pair
<<b>const
</b> <a href =
"#key_type3735929433">key_type
</a>,
<a href =
"#data_type3735929514">data_type
</a>> >::other::const_pointer
</pre>
755 <p>Const Value pointer type.
</p>
765 <a name =
"link8">Iterator definitions.
770 <table WIDTH =
"100%" BORDER =
"1">
771 <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>
776 <pre><a name =
"const_find_iterator3735929537">const_find_iterator
</a></pre>
782 <pre>Underlying data-structure's const find-type iterator.
</pre>
788 <p>Const find-type iterator.
</p>
797 <pre><a name =
"find_iterator3735929945">find_iterator
</a></pre>
803 <pre>Underlying data-structure's find-type iterator.
</pre>
809 <p>Find-type iterator.
</p>
818 <pre><a name =
"const_iterator3735930079">const_iterator
</a></pre>
824 <pre>Underlying data-structure's const range-type iterator.
</pre>
830 <p>Const range-type iterator.
</p>
839 <pre><a name =
"iterator3735929433">iterator
</a></pre>
845 <pre>Underlying data-structure's range-type iterator.
</pre>
851 <p>Range-type iterator.
</p>
861 <a name =
"link9">Constructors, destructor, and related.
866 <table WIDTH =
"100%" BORDER =
"1">
867 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
890 <a name =
"link10">Information methods.
895 <table WIDTH =
"100%" BORDER =
"1">
896 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
901 <pre><b>inline
</b> <a href =
"#size_type3735929547">size_type
</a>
903 ()
<b>const
</b></pre>
909 <p>Returns the number of distinct
<a href =
"#value_type3735929645"><tt>value_type
</tt></a> objects the container object is storing.
</p>
918 <pre><b>inline
</b> <a href =
"#size_type3735929547">size_type
</a>
920 ()
<b>const
</b></pre>
926 <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>
935 <pre><b>inline
</b> <b>bool
</b>
937 ()
<b>const
</b></pre>
943 <p>Returns whether the container object is not storing any
<a href =
"#value_type3735929645"><tt>value_type
</tt></a> objects.
</p>
952 <pre><b>inline
</b> static
<a href =
"#const_key_reference3735929552">const_key_reference
</a>
954 (
<a href =
"#const_reference3735930148">const_reference
</a> r_val)
</pre>
960 <p>Extracts a key from a
<a href =
"#value_type3735929645"><tt>value_type
</tt></a>.
</p>
970 <a name =
"link11">Insert methods.
975 <table WIDTH =
"100%" BORDER =
"1">
976 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
981 <pre><b>inline
</b> std::pair
<<a href =
"#find_iterator3735929945">find_iterator
</a>,
<b>bool
</b>>
983 (
<a href =
"#const_reference3735930148">const_reference
</a> r_val)
</pre>
989 <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>
998 <pre><b>inline
</b> <a href =
"#data_reference3735930007">data_reference
</a>
1000 (
<a href =
"#const_key_reference3735929552">const_key_reference
</a> r_key)
</pre>
1006 <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>
1016 <a name =
"link12">Find methods.
1021 <table WIDTH =
"100%" BORDER =
"1">
1022 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
1027 <pre><b>inline
</b> <a href =
"#find_iterator3735929945">find_iterator
</a>
1029 (
<a href =
"#const_key_reference3735929552">const_key_reference
</a> r_key)
</pre>
1035 <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>
1044 <pre><b>inline
</b> <a href =
"#const_find_iterator3735929537">const_find_iterator
</a>
1046 (
<a href =
"#const_key_reference3735929552">const_key_reference
</a> r_key)
<b>const
</b></pre>
1052 <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>
1061 <pre><b>inline
</b> <a href =
"#const_data_reference3735929597">const_data_reference
</a>
1063 (
<a href =
"#const_key_reference3735929552">const_key_reference
</a> r_key)
<b>const
</b></pre>
1069 <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>
1079 <a name =
"link13">Erase methods.
1084 <table WIDTH =
"100%" BORDER =
"1">
1085 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
1090 <pre><b>inline
</b> <a href =
"#size_type3735929547">size_type
</a>
1092 (
<a href =
"#const_key_reference3735929552">const_key_reference
</a> r_key)
</pre>
1098 <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>
1107 <pre><b>template
</b><
1108 <b>class
</b> Pred
>
1109 <b>inline
</b> <a href =
"#size_type3735929547">size_type
</a>
1117 <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>
1134 <p>Clears the container object.
</p>
1144 <a name =
"link14">Iteration methods.
1149 <table WIDTH =
"100%" BORDER =
"1">
1150 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
1155 <pre><b>inline
</b> <a href =
"#iterator3735929433">iterator
</a>
1163 <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>
1172 <pre><b>inline
</b> <a href =
"#const_iterator3735930079">const_iterator
</a>
1174 ()
<b>const
</b></pre>
1180 <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>
1189 <pre><b>inline
</b> <a href =
"#iterator3735929433">iterator
</a>
1197 <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>
1206 <pre><b>inline
</b> <a href =
"#const_iterator3735930079">const_iterator
</a>
1208 ()
<b>const
</b></pre>
1214 <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>