Dynalib Utils
Functions | Variables
hashc Namespace Reference

Functions

int hashSeed ()
 
int hashMultiplier ()
 
int hashMask ()
 
int hashCode (bool key)
 
int hashCode (char key)
 
int hashCode (double key)
 
int hashCode (float key)
 
int hashCode (int key)
 
int hashCode (long key)
 
int hashCode (long long key)
 
int hashCode (const char *str)
 
int hashCode (const std::string &str)
 
int hashCode (void *key)
 
int getInitialCode ()
 
int getFinalCode (int code)
 
template<class T >
int add (int code, T value)
 

Variables

const int HASH_SEED = 5381
 
const int HASH_MULTIPLIER = 33
 
const unsigned HASH_MASK = unsigned(-1) >> 1u
 

Function Documentation

◆ add()

template<class T >
int hashc::add ( int  code,
value 
)

◆ getFinalCode()

int hashc::getFinalCode ( int  code)

◆ getInitialCode()

int hashc::getInitialCode ( )

◆ hashCode() [1/10]

int hashc::hashCode ( bool  key)

◆ hashCode() [2/10]

int hashc::hashCode ( char  key)

◆ hashCode() [3/10]

int hashc::hashCode ( double  key)

◆ hashCode() [4/10]

int hashc::hashCode ( float  key)

◆ hashCode() [5/10]

int hashc::hashCode ( int  key)

◆ hashCode() [6/10]

int hashc::hashCode ( long  key)

◆ hashCode() [7/10]

int hashc::hashCode ( long long  key)

◆ hashCode() [8/10]

int hashc::hashCode ( const char *  str)

◆ hashCode() [9/10]

int hashc::hashCode ( const std::string &  str)

◆ hashCode() [10/10]

int hashc::hashCode ( void *  key)

◆ hashMask()

int hashc::hashMask ( )

◆ hashMultiplier()

int hashc::hashMultiplier ( )

◆ hashSeed()

int hashc::hashSeed ( )

Variable Documentation

◆ HASH_MASK

const unsigned hashc::HASH_MASK = unsigned(-1) >> 1u

◆ HASH_MULTIPLIER

const int hashc::HASH_MULTIPLIER = 33

◆ HASH_SEED

const int hashc::HASH_SEED = 5381