xtd 0.2.0
xtd::collections::generic::dictionary< key_t, value_t, hasher_t, equator_t, allocator_t >::hasher Struct Reference

Definition

template<class key_t, class value_t, class hasher_t = helpers::hasher<key_t>, class equator_t = helpers::equator<key_t>, class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
struct xtd::collections::generic::dictionary< key_t, value_t, hasher_t, equator_t, allocator_t >::hasher

Represents the dictionary hasher type.

Public Aliases

using argument_type = key_t
 Represents the argument type.
 
using result_type = xtd::size
 Represents the result type.
 

Public Operators

size_t operator() (const key_t &key) const
 Serves as a hash function for a specified key with a particular type (type_t).
 

Member Typedef Documentation

◆ argument_type

template<class key_t , class value_t , class hasher_t = helpers::hasher<key_t>, class equator_t = helpers::equator<key_t>, class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
using xtd::collections::generic::dictionary< key_t, value_t, hasher_t, equator_t, allocator_t >::hasher::argument_type = key_t

Represents the argument type.

◆ result_type

template<class key_t , class value_t , class hasher_t = helpers::hasher<key_t>, class equator_t = helpers::equator<key_t>, class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
using xtd::collections::generic::dictionary< key_t, value_t, hasher_t, equator_t, allocator_t >::hasher::result_type = xtd::size

Represents the result type.

Member Function Documentation

◆ operator()()

template<class key_t , class value_t , class hasher_t = helpers::hasher<key_t>, class equator_t = helpers::equator<key_t>, class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
size_t xtd::collections::generic::dictionary< key_t, value_t, hasher_t, equator_t, allocator_t >::hasher::operator() ( const key_t &  key) const
inline

Serves as a hash function for a specified key with a particular type (type_t).

Parameters
keyThe key to hash.
Returns
A hash code for the spesified key.
Remarks
If key_t inherits from xtd::object, the xtd::object::get_hash_code method will be used; otherwise, the std::hash object function will be used.

The documentation for this struct was generated from the following file: