# `cc_hash_assoc_cntnr` Interface

A collision-chaining hash-based associative container.

1. `assoc_cntnr.hpp`
2. Template parameters.
3. Base classes.
4. Public Types and Constants:
   1. Policy definitions.
5. Public Methods:
   1. Constructors, destructor, and related.
   2. Policy access methods.

## Template parameters.

Parameter | Description | Default Value

    Key

Key type.

-

    Data

Data type.

-

    Hash_Fn

Hash functor.

    __gnu_cxx::hash<Key>

if using gcc;

    stdext::hash_value<Key>

if using Visual C++ .net

    Eq_Fn

Equivalence functor.

    std::equal_to<Key>

    Comb_Hash_Fn

Combining hash functor.

If Hash_Fn is not `null_hash_fn`, then this is the range_hashing function functor; otherwise, this is the ranged_hash function functor.

    direct_mask_range_hashing<
      Allocator>

    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_prime_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>

    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

    Allocator

Allocator type.

    std::allocator<char>

## Base classes.

Class | Derivation Type

    Comb_Hash_Fn

public

    basic_hash_assoc_cntnr

public

## Policy definitions.

Type | Definition | Description

    comb_hash_fn

    Comb_Hash_Fn

Combining hash functor type.

## Constructors, destructor, and related.

Method | Description

      cc_hash_assoc_cntnr
      ()

Default constructor.

      cc_hash_assoc_cntnr
      (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_assoc_cntnr
      (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_assoc_cntnr
      (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_assoc_cntnr
      (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_assoc_cntnr
      (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_assoc_cntnr
      (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_assoc_cntnr
      (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_assoc_cntnr
      (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_assoc_cntnr
      (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_assoc_cntnr
      (const cc_hash_assoc_cntnr &r_other)

Copy constructor.

    virtual
      ~cc_hash_assoc_cntnr
      ()

Destructor.

    cc_hash_assoc_cntnr &
      operator=
      (const cc_hash_assoc_cntnr &r_other)

Assignment operator.

    void
      swap
      (cc_hash_assoc_cntnr &r_other)

Swaps content.

## Policy access methods.

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.