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
"set
" 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">Value-type definitions.
74 <a href =
"#link7">Iterator definitions.
89 <a href =
"#link8">Constructors, destructor, and related.
95 <a href =
"#link9">Information methods.
101 <a href =
"#link10">Insert methods.
107 <a href =
"#link11">Find methods.
113 <a href =
"#link12">Erase methods.
119 <a href =
"#link13">Iteration methods.
132 <a name =
"link1">Template parameters.
137 <table WIDTH =
"100%" BORDER =
"1">
138 <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>
143 <pre><a name =
"Key3735928856">Key
</a></pre>
164 <pre><a name =
"DS_Tag3735929089">DS_Tag
</a></pre>
170 <p>Data structure tag.
</p>
185 <pre><a name =
"Policy_Tl3735929470">Policy_Tl
</a></pre>
191 <p>Policy typelist.
</p>
206 <pre><a name =
"Allocator3735929488">Allocator
</a></pre>
212 <p>Allocator type.
</p>
228 <a name =
"link2">General container definitions.
233 <table WIDTH =
"100%" BORDER =
"1">
234 <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>
239 <pre><a name =
"size_type3735929547">size_type
</a></pre>
245 <pre><b>typename
</b> <a href =
"#Allocator3735929488">Allocator
</a>::size_type
</pre>
260 <pre><a name =
"difference_type3735930139">difference_type
</a></pre>
266 <pre><b>typename
</b> <a href =
"#Allocator3735929488">Allocator
</a>::difference_type
</pre>
272 <p>Difference type.
</p>
282 <a name =
"link3">Categories.
287 <table WIDTH =
"100%" BORDER =
"1">
288 <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>
293 <pre><a name =
"ds_category3735929731">ds_category
</a></pre>
299 <pre><a href =
"#DS_Tag3735929089">DS_Tag
</a></pre>
305 <p>The underlying data-structure tag of the container. comment =
</p>
314 <pre><a name =
"ms_category3735929740">ms_category
</a></pre>
320 <pre><a href =
"basic_ms_tag.html"><tt>basic_ms_tag
</tt></a></pre>
326 <p>The mapping-semantics category of the container.
</p>
336 <a name =
"link4">Policy definitions.
341 <table WIDTH =
"100%" BORDER =
"1">
342 <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>
347 <pre><a name =
"allocator3735929520">allocator
</a></pre>
353 <pre><a href =
"#Allocator3735929488">Allocator
</a></pre>
359 <p>Allocator type.
</p>
369 <a name =
"link5">Key-type 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 =
"key_type3735929433">key_type
</a></pre>
386 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
387 <a href =
"#Key3735928856">Key
</a>>::other::value_type
</pre>
402 <pre><a name =
"key_reference3735929926">key_reference
</a></pre>
408 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
409 <a href =
"#Key3735928856">Key
</a>>::other::reference
</pre>
415 <p>Key reference type.
</p>
424 <pre><a name =
"const_key_reference3735929552">const_key_reference
</a></pre>
430 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
431 <a href =
"#Key3735928856">Key
</a>>::other::const_reference
</pre>
437 <p>Const key reference type.
</p>
446 <pre><a name =
"key_pointer3735929752">key_pointer
</a></pre>
452 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
453 <a href =
"#Key3735928856">Key
</a>>::other::pointer
</pre>
459 <p>Key pointer type.
</p>
468 <pre><a name =
"const_key_pointer3735929445">const_key_pointer
</a></pre>
474 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::
<b>template
</b> rebind
<
475 <a href =
"#Key3735928856">Key
</a>>::other::const_pointer
</pre>
481 <p>Const key pointer type.
</p>
491 <a name =
"link6">Value-type definitions.
496 <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>
499 <table WIDTH =
"100%" BORDER =
"1">
500 <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>
505 <pre><a name =
"value_type3735929645">value_type
</a></pre>
511 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
512 <a href =
"#key_type3735929433">key_type
</a>>::other::value_type
</pre>
527 <pre><a name =
"reference3735929502">reference
</a></pre>
533 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
534 <a href =
"#key_type3735929433">key_type
</a>>::other::const_reference
</pre>
540 <p>Value reference type.
</p>
549 <pre><a name =
"const_reference3735930148">const_reference
</a></pre>
555 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
556 <a href =
"#key_type3735929433">key_type
</a>>::other::const_reference
</pre>
562 <p>Const value reference type.
</p>
571 <pre><a name =
"pointer3735929328">pointer
</a></pre>
577 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
578 <a href =
"#key_type3735929433">key_type
</a>> >::other::const_pointer
</pre>
584 <p>Value pointer type.
</p>
593 <pre><a name =
"const_pointer3735929974">const_pointer
</a></pre>
599 <pre><b>typename
</b> <a href =
"#allocator3735929520">allocator
</a>::rebind
<
600 <a href =
"#key_type3735929433">key_type
</a>> >::other::const_pointer
</pre>
606 <p>Const Value pointer type.
</p>
616 <a name =
"link7">Iterator definitions.
621 <table WIDTH =
"100%" BORDER =
"1">
622 <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>
627 <pre><a name =
"const_find_iterator3735929537">const_find_iterator
</a></pre>
633 <pre>Underlying data-structure's const find-type iterator.
</pre>
639 <p>Const find-type iterator.
</p>
648 <pre><a name =
"find_iterator3735929945">find_iterator
</a></pre>
654 <pre>Underlying data-structure's find-type iterator.
</pre>
660 <p>Find-type iterator.
</p>
669 <pre><a name =
"const_iterator3735930079">const_iterator
</a></pre>
675 <pre>Underlying data-structure's const range-type iterator.
</pre>
681 <p>Const range-type iterator.
</p>
690 <pre><a name =
"iterator3735929433">iterator
</a></pre>
696 <pre>Underlying data-structure's range-type iterator.
</pre>
702 <p>Range-type iterator.
</p>
712 <a name =
"link8">Constructors, destructor, and related.
717 <table WIDTH =
"100%" BORDER =
"1">
718 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
741 <a name =
"link9">Information methods.
746 <table WIDTH =
"100%" BORDER =
"1">
747 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
752 <pre><b>inline
</b> <a href =
"#size_type3735929547">size_type
</a>
754 ()
<b>const
</b></pre>
760 <p>Returns the number of distinct
<a href =
"#value_type3735929645"><tt>value_type
</tt></a> objects the container object is storing.
</p>
769 <pre><b>inline
</b> <a href =
"#size_type3735929547">size_type
</a>
771 ()
<b>const
</b></pre>
777 <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>
786 <pre><b>inline
</b> <b>bool
</b>
788 ()
<b>const
</b></pre>
794 <p>Returns whether the container object is not storing any
<a href =
"#value_type3735929645"><tt>value_type
</tt></a> objects.
</p>
803 <pre><b>inline
</b> static
<a href =
"#const_key_reference3735929552">const_key_reference
</a>
805 (
<a href =
"#const_reference3735930148">const_reference
</a> r_val)
</pre>
811 <p>Extracts a key from a
<a href =
"#value_type3735929645"><tt>value_type
</tt></a>.
</p>
821 <a name =
"link10">Insert methods.
826 <table WIDTH =
"100%" BORDER =
"1">
827 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
832 <pre><b>inline
</b> std::pair
<<a href =
"#find_iterator3735929945">find_iterator
</a>,
<b>bool
</b>>
834 (
<a href =
"#const_reference3735930148">const_reference
</a> r_val)
</pre>
840 <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>
850 <a name =
"link11">Find methods.
855 <table WIDTH =
"100%" BORDER =
"1">
856 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
861 <pre><b>inline
</b> <a href =
"#find_iterator3735929945">find_iterator
</a>
863 (
<a href =
"#const_key_reference3735929552">const_key_reference
</a> r_key)
</pre>
869 <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>
878 <pre><b>inline
</b> <a href =
"#const_find_iterator3735929537">const_find_iterator
</a>
880 (
<a href =
"#const_key_reference3735929552">const_key_reference
</a> r_key)
<b>const
</b></pre>
886 <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>
896 <a name =
"link12">Erase methods.
901 <table WIDTH =
"100%" BORDER =
"1">
902 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
907 <pre><b>inline
</b> <a href =
"#size_type3735929547">size_type
</a>
909 (
<a href =
"#const_key_reference3735929552">const_key_reference
</a> r_key)
</pre>
915 <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>
924 <pre><b>template
</b><
925 <b>class
</b> Pred
>
926 <b>inline
</b> <a href =
"#size_type3735929547">size_type
</a>
934 <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>
951 <p>Clears the container object.
</p>
961 <a name =
"link13">Iteration methods.
966 <table WIDTH =
"100%" BORDER =
"1">
967 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
972 <pre><b>inline
</b> <a href =
"#iterator3735929433">iterator
</a>
980 <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>
989 <pre><b>inline
</b> <a href =
"#const_iterator3735930079">const_iterator
</a>
991 ()
<b>const
</b></pre>
997 <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>
1006 <pre><b>inline
</b> <a href =
"#iterator3735929433">iterator
</a>
1014 <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>
1023 <pre><b>inline
</b> <a href =
"#const_iterator3735930079">const_iterator
</a>
1025 ()
<b>const
</b></pre>
1031 <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>