2 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
7 <title>hash_standard_resize_policy Interface
14 <tt>hash_standard_resize_policy
22 <p>A resize policy which delegates operations to size and trigger policies.
27 <a href =
"../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp
</tt>
33 <a href =
"#link1">Template parameters.
39 <a href =
"#link2">Base classes.
45 Public Types and Constants:
50 <a href =
"#link3">General definitions.
56 <a href =
"#link4">Policy definitions.
71 <a href =
"#link5">Constructors, destructor, and related.
77 <a href =
"#link6">Policy access methods.
83 <a href =
"#link7">Size access methods.
98 <a href =
"#link8">Insert search notifications.
104 <a href =
"#link9">Find search notifications.
110 <a href =
"#link10">Erase search notifications.
116 <a href =
"#link11">Content change notifications.
122 <a href =
"#link12">Size change notifications.
128 <a href =
"#link13">Queries.
141 <a name =
"link1">Template parameters.
146 <table WIDTH =
"100%" BORDER =
"1">
147 <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>
152 <pre><a name =
"Size_Policy3735929689">Size_Policy
</a></pre>
158 <p>Size policy type.
</p>
164 <a href =
"hash_exponential_size_policy.html"><tt>hash_exponential_size_policy
<></tt></a>
173 <pre><a name =
"Trigger_Policy3735930002">Trigger_Policy
</a></pre>
179 <p>Trigger policy type.
</p>
185 <a href =
"hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger
<></tt></a>
194 <pre><a name =
"External_Size_Access3735929535">External_Size_Access
</a></pre>
200 <p>Indicates whether physical sizes can be accessed externally.
</p>
206 <tt><b>false
</b></tt>
215 <pre><a name =
"Size_Type3735929483">Size_Type
</a></pre>
237 <a name =
"link2">Base classes.
242 <table WIDTH =
"100%" BORDER =
"1">
243 <TR><TD Width =
"80%" ALIGN =
"left"><b>Class
</b></TD><TD Width =
"20%" ALIGN =
"left"><b>Derivation Type
</b></TD></TR>
248 <pre><a href =
"#Size_Policy3735929689">Size_Policy
</a></pre>
263 <pre><a href =
"#Trigger_Policy3735930002">Trigger_Policy
</a></pre>
279 <a name =
"link3">General definitions.
284 <table WIDTH =
"100%" BORDER =
"1">
285 <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>
290 <pre><a name =
"size_type3735929547">size_type
</a></pre>
296 <pre><a href =
"#Size_Type3735929483">Size_Type
</a></pre>
312 <a name =
"link4">Policy definitions.
317 <table WIDTH =
"100%" BORDER =
"1">
318 <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>
323 <pre><a name =
"trigger_policy3735930066">trigger_policy
</a></pre>
329 <pre><a href =
"#Trigger_Policy3735930002">Trigger_Policy
</a></pre>
335 <p>Trigger policy type.
</p>
344 <pre><a name =
"size_policy3735929753">size_policy
</a></pre>
350 <pre><a href =
"#Size_Policy3735929689">Size_Policy
</a></pre>
356 <p>Size policy type.
</p>
365 <pre><a name =
"external_size_access3735929599">external_size_access
</a></pre>
371 <pre><a href =
"#External_Size_Access3735929535">External_Size_Access
</a></pre>
377 <p>Indicates whether sizes can be accessed externally.
</p>
387 <a name =
"link5">Constructors, destructor, and related.
392 <table WIDTH =
"100%" BORDER =
"1">
393 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
398 <pre> hash_standard_resize_policy
399 (
<a href =
"#size_type3735929547">size_type
</a> suggested_size =
8)
</pre>
405 <p>Default constructor, or constructor taking
<font color =
"#666666"><tt>suggested_size
</tt></font>, a suggested size (the actual size will be determined by the
<a href =
"#Size_Policy3735929689"><tt>Size_Policy
</tt></a> object).
</p>
414 <pre> hash_standard_resize_policy
415 (
<b>const
</b> <a href =
"#Size_Policy3735929689">Size_Policy
</a> &r_size_policy,
416 <a href =
"#size_type3735929547">size_type
</a> suggested_size =
8)
</pre>
422 <p>constructor taking some policies and
<font color =
"#666666"><tt>suggested_size
</tt></font>, a suggested size (the actual size will be determined by the
<a href =
"#Size_Policy3735929689"><tt>Size_Policy
</tt></a> object).
<font color =
"#666666"><tt>r_size_policy
</tt></font> will be copied by the
<a href =
"#Size_Policy3735929689"><tt>Size_Policy
</tt></a> object of this object.
</p>
431 <pre> hash_standard_resize_policy
432 (
<b>const
</b> <a href =
"#Size_Policy3735929689">Size_Policy
</a> &r_size_policy,
433 <b>const
</b> <a href =
"#Trigger_Policy3735930002">Trigger_Policy
</a> &r_trigger_policy,
434 <a href =
"#size_type3735929547">size_type
</a> suggested_size =
8)
</pre>
440 <p>constructor taking some policies and
<font color =
"#666666"><tt>suggested_size
</tt></font>, a suggested size (the actual size will be determined by the
<a href =
"#Size_Policy3735929689"><tt>Size_Policy
</tt></a> object).
<font color =
"#666666"><tt>r_size_policy
</tt></font> will be copied by the
<a href =
"#Size_Policy3735929689"><tt>Size_Policy
</tt></a> object of this object.
<font color =
"#666666"><tt>r_trigger_policy
</tt></font> will be copied by the
<a href =
"#Trigger_Policy3735930002"><tt>Trigger_Policy
</tt></a> object of this object.
</p>
450 ~hash_standard_resize_policy
466 <pre><b>inline
</b> <b>void
</b>
468 (
<font color =
"olive">hash_standard_resize_policy
</font> &r_other)
</pre>
474 <p>Swaps content.
</p>
484 <a name =
"link6">Policy access methods.
489 <table WIDTH =
"100%" BORDER =
"1">
490 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
495 <pre><a href =
"#Size_Policy3735929689">Size_Policy
</a> &
503 <p>Access to the
<a href =
"#Size_Policy3735929689"><tt>Size_Policy
</tt></a> object used.
</p>
512 <pre><b>const
</b> <a href =
"#Size_Policy3735929689">Size_Policy
</a> &
514 ()
<b>const
</b></pre>
520 <p>Const access to the
<a href =
"#Size_Policy3735929689"><tt>Size_Policy
</tt></a> object used.
</p>
529 <pre><a href =
"#Trigger_Policy3735930002">Trigger_Policy
</a> &
537 <p>Access to the
<a href =
"#Trigger_Policy3735930002"><tt>Trigger_Policy
</tt></a> object used.
</p>
546 <pre><b>const
</b> <a href =
"#Trigger_Policy3735930002">Trigger_Policy
</a> &
548 ()
<b>const
</b></pre>
554 <p>Access to the
<a href =
"#Trigger_Policy3735930002"><tt>Trigger_Policy
</tt></a> object used.
</p>
564 <a name =
"link7">Size access methods.
569 <p>These methods are available only if the external size parameter indicates that external size access is allowed.
</p>
572 <table WIDTH =
"100%" BORDER =
"1">
573 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
578 <pre><b>inline
</b> <a href =
"#size_type3735929547">size_type
</a>
580 ()
<b>const
</b></pre>
586 <p>Returns the actual size of the container.
</p>
589 <p>This method returns the number of entries (used and unused) in the container. It is different from the container's size method, which returns the number of used entries. Calling this method will not compile when
<a href =
"#External_Size_Access3735929535"><tt>External_Size_Access
</tt></a> ==
<tt><b>false
</b></tt>.
</p>
600 (
<a href =
"#size_type3735929547">size_type
</a> suggested_new_size)
</pre>
606 <p>Resizes the container to
<font color =
"#666666"><tt>suggested_new_size
</tt></font>, a suggested size (the actual size will be determined by the
<a href =
"#Size_Policy3735929689"><tt>Size_Policy
</tt></a> object).
</p>
609 <p>Calling this method will not compile when
<a href =
"#External_Size_Access3735929535"><tt>External_Size_Access
</tt></a> ==
<tt><b>false
</b></tt>.
</p>
619 <a name =
"link8">Insert search notifications.
624 <p>Notifications called during an insert operation.
</p>
627 <table WIDTH =
"100%" BORDER =
"1">
628 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
633 <pre><b>inline
</b> <b>void
</b>
634 notify_insert_search_start
641 <p>Notifies a search started.
</p>
650 <pre><b>inline
</b> <b>void
</b>
651 notify_insert_search_collision
658 <p>Notifies a search encountered a collision.
</p>
667 <pre><b>inline
</b> <b>void
</b>
668 notify_insert_search_end
675 <p>Notifies a search ended.
</p>
685 <a name =
"link9">Find search notifications.
690 <p>Notifications called during a find operation.
</p>
693 <table WIDTH =
"100%" BORDER =
"1">
694 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
699 <pre><b>inline
</b> <b>void
</b>
700 notify_find_search_start
707 <p>Notifies a search started.
</p>
716 <pre><b>inline
</b> <b>void
</b>
717 notify_find_search_collision
724 <p>Notifies a search encountered a collision.
</p>
733 <pre><b>inline
</b> <b>void
</b>
734 notify_find_search_end
741 <p>Notifies a search ended.
</p>
751 <a name =
"link10">Erase search notifications.
756 <p>Notifications called during an insert operation.
</p>
759 <table WIDTH =
"100%" BORDER =
"1">
760 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
765 <pre><b>inline
</b> <b>void
</b>
766 notify_erase_search_start
773 <p>Notifies a search started.
</p>
782 <pre><b>inline
</b> <b>void
</b>
783 notify_erase_search_collision
790 <p>Notifies a search encountered a collision.
</p>
799 <pre><b>inline
</b> <b>void
</b>
800 notify_erase_search_end
807 <p>Notifies a search ended.
</p>
817 <a name =
"link11">Content change notifications.
822 <p>Notifications called when the content of the table changes in a way that can affect the resize policy.
</p>
825 <table WIDTH =
"100%" BORDER =
"1">
826 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
831 <pre><b>inline
</b> <b>void
</b>
833 (
<a href =
"#size_type3735929547">size_type
</a> num_e)
</pre>
839 <p>Notifies an element was inserted.
</p>
848 <pre><b>inline
</b> <b>void
</b>
850 (
<a href =
"#size_type3735929547">size_type
</a> num_e)
</pre>
856 <p>Notifies an element was erased.
</p>
873 <p>Notifies the table was cleared.
</p>
883 <a name =
"link12">Size change notifications.
888 <p>Notifications called when the table changes size.
</p>
891 <table WIDTH =
"100%" BORDER =
"1">
892 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
899 (
<a href =
"#size_type3735929547">size_type
</a> new_size)
</pre>
905 <p>Notifies the table was resized to
<font color =
"#666666"><tt>new_size
</tt></font>.
</p>
915 <a name =
"link13">Queries.
920 <p>Called to query whether/how to resize.
</p>
923 <table WIDTH =
"100%" BORDER =
"1">
924 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
929 <pre><a href =
"#size_type3735929547">size_type
</a>
931 ()
<b>const
</b></pre>
937 <p>Queries initial size.
</p>
946 <pre><b>inline
</b> <b>bool
</b>
948 ()
<b>const
</b></pre>
954 <p>Queries whether a resize is needed.
</p>
963 <pre><a href =
"#size_type3735929547">size_type
</a>
965 (
<a href =
"#size_type3735929547">size_type
</a> size,
<a href =
"#size_type3735929547">size_type
</a> num_used_e)
<b>const
</b></pre>
971 <p>Queries what the new
<font color =
"#666666"><tt>size
</tt></font> should be.
</p>