hash_standard_resize_policy
 Interface
A resize policy which delegates operations to size and trigger policies.
../../../../include/ext/pb_assoc/hash_policy.hpphash_policy.hpp #link1Template parameters.
#link2Base classes.
Public Types and Constants:
#link3General definitions.
#link4Policy definitions.
Public Methods:
#link5Constructors, destructor, and related.
#link6Policy access methods.
#link7Size access methods.
Protected Methods:
#link8Insert search notifications.
#link9Find search notifications.
#link10Erase search notifications.
#link11Content change notifications.
#link12Size change notifications.
#link13Queries.
Template parameters.
Parameter Description Default Value Size_Policy Size policy type.
hash_exponential_size_policy.htmlhash_exponential_size_policy<> Trigger_Policy Trigger policy type.
hash_load_check_resize_trigger.htmlhash_load_check_resize_trigger<> External_Size_Access Indicates whether physical sizes can be accessed externally.
false Size_Type Size type.
size_t
Base classes.
Class Derivation Type #Size_Policy3735929689Size_Policy public
#Trigger_Policy3735930002Trigger_Policy public
General definitions.
Type Definition Description size_type #Size_Type3735929483Size_Type Size type.
Policy definitions.
Type Definition Description trigger_policy #Trigger_Policy3735930002Trigger_Policy Trigger policy type.
size_policy #Size_Policy3735929689Size_Policy Size policy type.
external_size_access #External_Size_Access3735929535External_Size_Access Indicates whether sizes can be accessed externally.
Constructors, destructor, and related.
Method Description   hash_standard_resize_policy
  (
#size_type3735929547size_type  suggested_size = 8) Default constructor, or constructor taking suggested_size, a suggested size (the actual size will be determined by the #Size_Policy3735929689Size_Policy  object).
  hash_standard_resize_policy
  (
const #Size_Policy3735929689Size_Policy  &r_size_policy,
    
#size_type3735929547size_type  suggested_size = 8) constructor taking some policies and suggested_size, a suggested size (the actual size will be determined by the #Size_Policy3735929689Size_Policy  object). r_size_policy will be copied by the #Size_Policy3735929689Size_Policy  object of this object.
  hash_standard_resize_policy
  (
const #Size_Policy3735929689Size_Policy  &r_size_policy,
    
const #Trigger_Policy3735930002Trigger_Policy  &r_trigger_policy,
    
#size_type3735929547size_type  suggested_size = 8) constructor taking some policies and suggested_size, a suggested size (the actual size will be determined by the #Size_Policy3735929689Size_Policy  object). r_size_policy will be copied by the #Size_Policy3735929689Size_Policy  object of this object. r_trigger_policy will be copied by the #Trigger_Policy3735930002Trigger_Policy  object of this object.
virtual  ~hash_standard_resize_policy
  ()
Destructor.
inline void  swap
  (
hash_standard_resize_policy &r_other) Swaps content.
Policy access methods.
Method Description #Size_Policy3735929689Size_Policy  &
  get_size_policy
  ()
Access to the #Size_Policy3735929689Size_Policy  object used.
const #Size_Policy3735929689Size_Policy  &
  get_size_policy
  () 
const Const access to the #Size_Policy3735929689Size_Policy  object used.
#Trigger_Policy3735930002Trigger_Policy  &
  get_trigger_policy
  ()
Access to the #Trigger_Policy3735930002Trigger_Policy  object used.
const #Trigger_Policy3735930002Trigger_Policy  &
  get_trigger_policy
  () 
const Access to the #Trigger_Policy3735930002Trigger_Policy  object used.
Size access methods.
These methods are available only if the external size parameter indicates that external size access is allowed.
Method Description inline #size_type3735929547size_type   get_actual_size
  () 
const Returns the actual size of the container.
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 #External_Size_Access3735929535External_Size_Access  == false.
void  resize
  (
#size_type3735929547size_type  suggested_new_size) Resizes the container to suggested_new_size, a suggested size (the actual size will be determined by the #Size_Policy3735929689Size_Policy  object).
Calling this method will not compile when #External_Size_Access3735929535External_Size_Access  == false.
Insert search notifications.
Notifications called during an insert operation.
Method Description inline void  notify_insert_search_start
  ()
Notifies a search started.
inline void  notify_insert_search_collision
  ()
Notifies a search encountered a collision.
inline void  notify_insert_search_end
  ()
Notifies a search ended.
Find search notifications.
Notifications called during a find operation.
Method Description inline void  notify_find_search_start
  ()
Notifies a search started.
inline void  notify_find_search_collision
  ()
Notifies a search encountered a collision.
inline void  notify_find_search_end
  ()
Notifies a search ended.
Erase search notifications.
Notifications called during an insert operation.
Method Description inline void  notify_erase_search_start
  ()
Notifies a search started.
inline void  notify_erase_search_collision
  ()
Notifies a search encountered a collision.
inline void  notify_erase_search_end
  ()
Notifies a search ended.
Content change notifications.
Notifications called when the content of the table changes in a way that can affect the resize policy.
Method Description inline void  notify_inserted
  (
#size_type3735929547size_type  num_e) Notifies an element was inserted.
inline void  notify_erased
  (
#size_type3735929547size_type  num_e) Notifies an element was erased.
void  notify_cleared
  ()
Notifies the table was cleared.
Size change notifications.
Notifications called when the table changes size.
Method Description void  notify_resized
  (
#size_type3735929547size_type  new_size) Notifies the table was resized to new_size.
Queries.
Called to query whether/how to resize.
Method Description #size_type3735929547size_type   get_init_size
  () 
const Queries initial size.
inline bool  is_resize_needed
  () 
const Queries whether a resize is needed.
#size_type3735929547size_type   get_new_size
  (
#size_type3735929547size_type  size, #size_type3735929547size_type  num_used_e) const Queries what the new size should be.
