momo  3.9
momo::HashTraits< TKey, THashBucket, TKeyArgBase > Class Template Reference

#include <HashTraits.h>

Public Types

typedef TKey Key
 
typedef THashBucket HashBucket
 
typedef TKeyArgBase KeyArgBase
 
template<typename ItemTraits >
using Bucket = typename HashBucket::template Bucket< ItemTraits, !isFastNothrowHashable >
 
template<typename KeyArg >
using IsValidKeyArg = typename std::conditional< std::is_same< KeyArgBase, Key >::value, std::false_type, std::is_convertible< const KeyArg &, const KeyArgBase & > >::type
 

Public Member Functions

 HashTraits () noexcept
 
size_t CalcCapacity (size_t bucketCount, size_t bucketMaxItemCount) const noexcept
 
size_t GetBucketCountShift (size_t bucketCount, size_t bucketMaxItemCount) const noexcept
 
size_t GetLogStartBucketCount () const noexcept
 
template<typename KeyArg >
size_t GetHashCode (const KeyArg &key) const
 
template<typename KeyArg1 , typename KeyArg2 >
bool IsEqual (const KeyArg1 &key1, const KeyArg2 &key2) const
 

Static Public Attributes

static const bool isFastNothrowHashable = IsFastNothrowHashable<KeyArgBase>::value
 

Member Typedef Documentation

◆ Bucket

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
template<typename ItemTraits >
using momo::HashTraits< TKey, THashBucket, TKeyArgBase >::Bucket = typename HashBucket::template Bucket<ItemTraits, !isFastNothrowHashable>

◆ HashBucket

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
typedef THashBucket momo::HashTraits< TKey, THashBucket, TKeyArgBase >::HashBucket

◆ IsValidKeyArg

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
template<typename KeyArg >
using momo::HashTraits< TKey, THashBucket, TKeyArgBase >::IsValidKeyArg = typename std::conditional<std::is_same<KeyArgBase, Key>::value, std::false_type, std::is_convertible<const KeyArg&, const KeyArgBase&> >::type

◆ Key

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
typedef TKey momo::HashTraits< TKey, THashBucket, TKeyArgBase >::Key

◆ KeyArgBase

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
typedef TKeyArgBase momo::HashTraits< TKey, THashBucket, TKeyArgBase >::KeyArgBase

Constructor & Destructor Documentation

◆ HashTraits()

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
momo::HashTraits< TKey, THashBucket, TKeyArgBase >::HashTraits ( )
inlineexplicitnoexcept

Member Function Documentation

◆ CalcCapacity()

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
size_t momo::HashTraits< TKey, THashBucket, TKeyArgBase >::CalcCapacity ( size_t  bucketCount,
size_t  bucketMaxItemCount 
) const
inlinenoexcept

◆ GetBucketCountShift()

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
size_t momo::HashTraits< TKey, THashBucket, TKeyArgBase >::GetBucketCountShift ( size_t  bucketCount,
size_t  bucketMaxItemCount 
) const
inlinenoexcept

◆ GetHashCode()

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
template<typename KeyArg >
size_t momo::HashTraits< TKey, THashBucket, TKeyArgBase >::GetHashCode ( const KeyArg &  key) const
inline

◆ GetLogStartBucketCount()

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
size_t momo::HashTraits< TKey, THashBucket, TKeyArgBase >::GetLogStartBucketCount ( ) const
inlinenoexcept

◆ IsEqual()

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
template<typename KeyArg1 , typename KeyArg2 >
bool momo::HashTraits< TKey, THashBucket, TKeyArgBase >::IsEqual ( const KeyArg1 &  key1,
const KeyArg2 &  key2 
) const
inline

Member Data Documentation

◆ isFastNothrowHashable

template<typename TKey , typename THashBucket = HashBucketDefault, typename TKeyArgBase = TKey>
const bool momo::HashTraits< TKey, THashBucket, TKeyArgBase >::isFastNothrowHashable = IsFastNothrowHashable<KeyArgBase>::value
static

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