Specifies whether the load factor can be accessed externally. The two options have different trade-offs in terms of flexibility, genericity, and encapsulation.
Default constructor, or constructor takingload_min andload_max load factors between which this policy will keep the actual load. It is the responsibility of the user to ensure thatload_min is smaller thanload_max.
void swap (hash_load_check_resize_trigger &other)
Swaps content.
virtual ~hash_load_check_resize_trigger ()
Destructor.
Load Access Methods
These methods are only available if the external access parameter is set.
Method
Description
inline std::pair<float, float> get_loads () const
Returns a pair of the minimal and maximal loads, respectively. Calling this method will not compile when External_Load_Access == false.
Sets the loads through a pair of the minimal and maximal loads, respectively. Calling this method resizes the container, and might throw an exception. It is the responsibility of the user to pass appropriate loads to this function. Calling this method will not compile when External_Load_Access == false.
Protected Methods
Insert Search Notifications.
Notifications called during an insert operation.
Method
Description
inlinevoid notify_insert_search_start ()
Notifies a search started.
inlinevoid notify_insert_search_collision ()
Notifies a search encountered a collision.
inlinevoid notify_insert_search_end ()
Notifies a search ended.
Find Search Notifications.
Notifications called during a find operation.
Method
Description
inlinevoid notify_find_search_start ()
Notifies a search started.
inlinevoid notify_find_search_collision ()
Notifies a search encountered a collision.
inlinevoid notify_find_search_end ()
Notifies a search ended.
Erase Search Notifications.
Notifications called during an insert operation.
Method
Description
inlinevoid notify_erase_search_start ()
Notifies a search started.
inlinevoid notify_erase_search_collision ()
Notifies a search encountered a collision.
inlinevoid 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.
Queries whether a grow is needed. This method is called only if this object indicated resize is needed. The actual size of the table is size, and the number of entries in it is num_entries.