ezEngine  Milestone 7
ezHashing Class Reference

This class provides implementations of different hashing algorithms. More...

#include <Hashing.h>

Classes

struct  StringWrapper
 helper struct to wrap a string pointer More...
 

Public Member Functions

template<size_t N>
EZ_FORCE_INLINE ezUInt32 MurmurHash (const char(&str)[N], ezUInt32 uiSeed)
 

Static Public Member Functions

static ezUInt32 CRC32Hash (const void *pKey, size_t uiSizeInBytes)
 Calculates the CRC32 checksum of the given key.
 
static ezUInt32 MurmurHash (const void *pKey, size_t uiSizeInByte, ezUInt32 uiSeed=0)
 Calculates the 32bit murmur hash of the given key.
 
static ezUInt64 MurmurHash64 (const void *pKey, size_t uiSizeInByte, ezUInt64 uiSeed=0)
 Calculates the 64bit murmur hash of the given key.
 
template<size_t N>
static ezUInt32 MurmurHash (const char(&str)[N], ezUInt32 uiSeed=0)
 Calculates the 32bit murmur hash of a string constant at compile time. Encoding does not matter here.
 
static ezUInt32 MurmurHash (StringWrapper str, ezUInt32 uiSeed=0)
 Calculates the 32bit murmur hash of a string pointer during runtime. Encoding does not matter here. More...
 

Detailed Description

This class provides implementations of different hashing algorithms.

Member Function Documentation

EZ_FORCE_INLINE ezUInt32 ezHashing::MurmurHash ( StringWrapper  str,
ezUInt32  uiSeed = 0 
)
static

Calculates the 32bit murmur hash of a string pointer during runtime. Encoding does not matter here.

We cannot pass a string pointer directly since a string constant would be treated as pointer as well.


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