Krita Source Code Documentation
Loading...
Searching...
No Matches
DefaultKeyTraits< T > Struct Template Reference

#include <map_traits.h>

Public Types

typedef quint32 Hash
 
typedef T Key
 

Static Public Member Functions

static Key dehash (Hash hash)
 
static Hash hash (T key)
 

Static Public Attributes

static const Hash NullHash = Hash(0)
 
static const Key NullKey = Key(0)
 

Detailed Description

template<class T>
struct DefaultKeyTraits< T >

Definition at line 55 of file map_traits.h.

Member Typedef Documentation

◆ Hash

template<class T >
typedef quint32 DefaultKeyTraits< T >::Hash

Definition at line 57 of file map_traits.h.

◆ Key

template<class T >
typedef T DefaultKeyTraits< T >::Key

Definition at line 56 of file map_traits.h.

Member Function Documentation

◆ dehash()

template<class T >
static Key DefaultKeyTraits< T >::dehash ( Hash hash)
inlinestatic

Definition at line 66 of file map_traits.h.

67 {
68 return (T) deavalanche(hash);
69 }
quint32 deavalanche(quint32 h)
Definition map_traits.h:44
static Hash hash(T key)
Definition map_traits.h:61

References deavalanche(), and DefaultKeyTraits< T >::hash().

◆ hash()

template<class T >
static Hash DefaultKeyTraits< T >::hash ( T key)
inlinestatic

Definition at line 61 of file map_traits.h.

62 {
63 return avalanche(Hash(key));
64 }
quint32 avalanche(quint32 h)
Definition map_traits.h:34

References avalanche().

Member Data Documentation

◆ NullHash

template<class T >
const Hash DefaultKeyTraits< T >::NullHash = Hash(0)
static

Definition at line 59 of file map_traits.h.

◆ NullKey

template<class T >
const Key DefaultKeyTraits< T >::NullKey = Key(0)
static

Definition at line 58 of file map_traits.h.


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