A concrete collision-chaining hash-based associative container.
Defined in: assoc_container.hpp
Parameter | Description | Default Value |
typename Key |
Key type. |
- |
typename Mapped |
Mapped type. |
- |
class Hash_Fn |
Hash functor. |
__gnu_cxx::hash<Key>if using gcc; stdext::hash_value<Key>if using Visual C++ .net |
class Eq_Fn |
Equivalence functor. |
std::equal_to<Key> |
class Comb_Hash_Fn |
Combining hash functor. If Hash_Fn is not null_hash_fn, then this is the ranged-hash functor; otherwise, this is the range-hashing functor. |
direct_mask_range_hashing |
class Resize_Policy |
Resize policy. |
If Comb_Hash_Fn
is direct_mask_range_hashing,
then
hash_standard_resize_policy< hash_exponential_size_policy< typename Comb_Hash_Fn::size_type>, hash_load_check_resize_trigger< typename Comb_Hash_Fn::size_type>, false, typename Comb_Hash_Fn::size_type>otherwise, hash_standard_resize_policy< hash_exponential_size_policy< typename Comb_Hash_Fn::size_type>, hash_load_check_resize_trigger< typename Comb_Hash_Fn::size_type>, false, typename Comb_Hash_Fn::size_type> |
bool Store_Hash |
Indicates whether the hash value will be stored along with each key. If hash_fn is null_hash_fn, then the container will not compile if this value is true |
false |
class Allocator |
Allocator type. |
std::allocator<char> |
Class | Derivation Type |
basic_hash_table |
public |
Type | Definition | Description |
hash_fn |
Hash_Fn |
Hash functor type. |
eq_fn |
Eq_Fn |
Equivalence functor type. |
resize_policy |
Resize_Policy |
Resize policy type. |
comb_hash_fn |
Comb_Hash_Fn |
Combining hash functor type. |
Method | Description |
cc_hash_table () |
Default constructor. |
cc_hash_table (const hash_fn &r_hash_fn) |
Constructor taking some policy objects. r_hash_fn will be copied by the Hash_Fn object of the container object. |
cc_hash_table (const hash_fn &r_hash_fn, const eq_fn &r_eq_fn) |
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the container object, and r_eq_fn will be copied by the eq_fn object of the container object. |
cc_hash_table (const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_hash_fn &r_comb_hash_fn) |
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, and r_comb_hash_fn will be copied by the comb_hash_fn object of the container object. |
cc_hash_table (const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_hash_fn &r_comb_hash_fn, const resize_policy &r_resize_policy) |
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, r_comb_hash_fn will be copied by the comb_hash_fn object of the container object, and r_resize_policy will be copied by the resize_policy object of the container object. |
template< class It> cc_hash_table (It first_it, It last_it) |
Constructor taking iterators to a range of value_types. The value_types between first_it and last_it will be inserted into the container object. |
template< class It> cc_hash_table (It first_it, It last_it, const hash_fn &r_hash_fn) |
Constructor taking iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object. |
template< class It> cc_hash_table (It first_it, It last_it, const hash_fn &r_hash_fn, const eq_fn &r_eq_fn) |
Constructor taking iterators to a range of value_types and some policy objects The value_types between first_it and last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object, and r_eq_fn will be copied by the eq_fn object of the container object. |
template< class It> cc_hash_table (It first_it, It last_it, const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_hash_fn &r_comb_hash_fn) |
Constructor taking iterators to a range of value_types and some policy objects The value_types between first_it and last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, and r_comb_hash_fn will be copied by the comb_hash_fn object of the container object. |
template< class It> cc_hash_table (It first_it, It last_it, const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_hash_fn &r_comb_hash_fn, const resize_policy &r_resize_policy) |
Constructor taking iterators to a range of value_types and some policy objects The value_types between first_it and last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, r_comb_hash_fn will be copied by the comb_hash_fn object of the container object, and r_resize_policy will be copied by the resize_policy object of the container object. |
cc_hash_table
(const cc_hash_table &other)
|
Copy constructor. |
virtual ~cc_hash_table () |
Destructor. |
cc_hash_table & operator= (const cc_hash_table &other) |
Assignment operator. |
void
swap
(cc_hash_table &other)
|
Swaps content. |
Method | Description |
comb_hash_fn & get_comb_hash_fn () |
Access to the comb_hash_fn object. |
const comb_hash_fn & get_comb_hash_fn () const |
Const access to the comb_hash_fn object. |