A resize policy which delegates operations to size and trigger policies. More...
#include <hash_policy.hpp>
Public Types | |
enum | { external_size_access = External_Size_Access } |
typedef Size_Policy | size_policy |
typedef Size_Type | size_type |
typedef Trigger_Policy | trigger_policy |
Public Member Functions | |
hash_standard_resize_policy () | |
Default constructor. More... | |
hash_standard_resize_policy (const Size_Policy &r_size_policy) | |
constructor taking some policies r_size_policy will be copied by the Size_Policy object of this object. More... | |
hash_standard_resize_policy (const Size_Policy &r_size_policy, const Trigger_Policy &r_trigger_policy) | |
constructor taking some policies. More... | |
virtual | ~hash_standard_resize_policy () |
size_type | get_actual_size () const |
Returns the actual size of the container. More... | |
Size_Policy & | get_size_policy () |
Access to the Size_Policy object used. More... | |
const Size_Policy & | get_size_policy () const |
Const access to the Size_Policy object used. More... | |
Trigger_Policy & | get_trigger_policy () |
Access to the Trigger_Policy object used. More... | |
const Trigger_Policy & | get_trigger_policy () const |
Access to the Trigger_Policy object used. More... | |
void | resize (size_type suggested_new_size) |
Resizes the container to suggested_new_size, a suggested size (the actual size will be determined by the Size_Policy object). More... | |
void | swap (hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type > &other) |
Protected Member Functions | |
size_type | get_new_size (size_type size, size_type num_used_e) const |
Queries what the new size should be, when the container is resized naturally. More... | |
bool | is_resize_needed () const |
void | notify_cleared () |
void | notify_erase_search_collision () |
void | notify_erase_search_end () |
void | notify_erase_search_start () |
void | notify_erased (size_type num_e) |
void | notify_find_search_collision () |
void | notify_find_search_end () |
void | notify_find_search_start () |
void | notify_insert_search_collision () |
void | notify_insert_search_end () |
void | notify_insert_search_start () |
void | notify_inserted (size_type num_e) |
void | notify_resized (size_type new_size) |
Private Types | |
typedef Size_Policy | size_policy_base |
typedef Trigger_Policy | trigger_policy_base |
Private Member Functions | |
virtual void | do_resize (size_type new_size) |
Resizes to new_size. More... | |
Private Attributes | |
size_type | m_size |
A resize policy which delegates operations to size and trigger policies.
typedef Size_Policy __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::size_policy |
|
private |
typedef Size_Type __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::size_type |
typedef Trigger_Policy __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::trigger_policy |
|
private |
anonymous enum |
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::hash_standard_resize_policy | ( | ) |
Default constructor.
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::hash_standard_resize_policy | ( | const Size_Policy & | r_size_policy | ) |
constructor taking some policies r_size_policy will be copied by the Size_Policy object of this object.
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::hash_standard_resize_policy | ( | const Size_Policy & | r_size_policy, |
const Trigger_Policy & | r_trigger_policy | ||
) |
constructor taking some policies.
r_size_policy will be copied by the Size_Policy object of this object. r_trigger_policy will be copied by the Trigger_Policy object of this object.
|
virtual |
|
privatevirtual |
Resizes to new_size.
|
inline |
Returns the actual size of the container.
|
protected |
Queries what the new size should be, when the container is resized naturally.
The current __size of the container is size, and the number of used entries within the container is num_used_e.
Size_Policy& __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_size_policy | ( | ) |
Access to the Size_Policy object used.
const Size_Policy& __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_size_policy | ( | ) | const |
Const access to the Size_Policy object used.
Trigger_Policy& __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_trigger_policy | ( | ) |
Access to the Trigger_Policy object used.
const Trigger_Policy& __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_trigger_policy | ( | ) | const |
Access to the Trigger_Policy object used.
|
inlineprotected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
void __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::resize | ( | size_type | suggested_new_size | ) |
Resizes the container to suggested_new_size, a suggested size (the actual size will be determined by the Size_Policy object).
|
inline |
|
private |