gp_hash_assoc_cntnr Interface

A general-probing 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.

ParameterDescriptionDefault 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_Probe_Fn

Combining probe functor.

If Hash_Fn is null_hash_fn, and Probe_Fn is comb_probe_fn, then this is the ranged_hash function functor; otherwise, this is the range_hashing function functor;

direct_mask_range_hashing<
  Allocator>
Probe_Fn

Probe functor.

If comb_hash_fn is direct_mask_range_hashing<>, then
linear_probe_fn<
  typename comb_hash_fn::size_type>
otherwise,
quadratic_probe_fn<
  typename comb_hash_fn::size_type>
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.

ClassDerivation Type
Comb_Probe_Fn

public

Probe_Fn

public

basic_hash_assoc_cntnr

public

Policy definitions.

TypeDefinitionDescription
comb_probe_fn
Comb_Probe_Fn

Combining probe functor type.

probe_fn
Probe_Fn

Probe functor type.

Constructors, destructor, and related.

MethodDescription
  gp_hash_assoc_cntnr
  ()

Default constructor.

  gp_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.

  gp_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.

  gp_hash_assoc_cntnr
  (const Hash_Fn &r_hash_fn,
    const Eq_Fn &r_eq_fn,
    const Comb_Probe_Fn &r_comb_probe_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_probe_fn will be copied by the Comb_Probe_Fn object of the container object.

  gp_hash_assoc_cntnr
  (const Hash_Fn &r_hash_fn,
    const Eq_Fn &r_eq_fn,
    const Comb_Probe_Fn &r_comb_probe_fn,
    const Probe_Fn &r_probe_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, r_comb_probe_fn will be copied by the Comb_Probe_Fn object of the container object, and r_probe_fn will be copied by the Probe_Fn object of the container object.

  gp_hash_assoc_cntnr
  (const Hash_Fn &r_hash_fn,
    const Eq_Fn &r_eq_fn,
    const Comb_Probe_Fn &r_comb_probe_fn,
    const Probe_Fn &r_probe_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_probe_fn will be copied by the Comb_Probe_Fn object of the container object, r_probe_fn will be copied by the Probe_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>
  gp_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>
  gp_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. r_hash_fn will be copied by the Hash_Fn object of the container object.

template<
    class It>
  gp_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>
  gp_hash_assoc_cntnr
  (It first_it,
    It last_it,
    const Hash_Fn &r_hash_fn,
    const Eq_Fn &r_eq_fn,
    const Comb_Probe_Fn &r_comb_probe_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_probe_fn will be copied by the Comb_Probe_Fn object of the container object.

template<
    class It>
  gp_hash_assoc_cntnr
  (It first_it,
    It last_it,
    const Hash_Fn &r_hash_fn,
    const Eq_Fn &r_eq_fn,
    const Comb_Probe_Fn &r_comb_probe_fn,
    const Probe_Fn &r_probe_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, r_comb_probe_fn will be copied by the Comb_Probe_Fn object of the container object, and r_probe_fn will be copied by the Probe_Fn object of the container object.

template<
    class It>
  gp_hash_assoc_cntnr
  (It first_it,
    It last_it,
    const Hash_Fn &r_hash_fn,
    const Eq_Fn &r_eq_fn,
    const Comb_Probe_Fn &r_comb_probe_fn,
    const Probe_Fn &r_probe_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_probe_fn will be copied by the Comb_Probe_Fn object of the container object, r_probe_fn will be copied by the Probe_Fn object of the container object, and r_resize_policy will be copied by the Resize_Policy object of the container object.

  gp_hash_assoc_cntnr
  (const gp_hash_assoc_cntnr &r_other)

Copy constructor.

virtual
  ~gp_hash_assoc_cntnr
  ()

Destructor.

gp_hash_assoc_cntnr &
  operator=
  (const gp_hash_assoc_cntnr &r_other)

Assignment operator.

void
  swap
  (gp_hash_assoc_cntnr &r_other)

Swaps content.

Policy access methods.

MethodDescription
comb_probe_fn &
  get_comb_probe_fn
  ()

Access to the comb_probe_fn object.

const comb_probe_fn &
  get_comb_probe_fn
  () const

Const access to the comb_probe_fn object.

probe_fn &
  get_probe_fn
  ()

Access to the probe_fn object.

const probe_fn &
  get_probe_fn
  () const

Const access to the probe_fn object.