DefaultHashFunctions Struct Reference

A simple class to generate hash functions for some primitive types, intended for use with the HashMap class. More...

Static Public Member Functions

static int generateHash (uint32 key, int upperLimit) noexcept
 Generates a simple hash from an unsigned int. More...
 
static int generateHash (int32 key, int upperLimit) noexcept
 Generates a simple hash from an integer. More...
 
static int generateHash (uint64 key, int upperLimit) noexcept
 Generates a simple hash from a uint64. More...
 
static int generateHash (int64 key, int upperLimit) noexcept
 Generates a simple hash from an int64. More...
 
static int generateHash (const String &key, int upperLimit) noexcept
 Generates a simple hash from a string. More...
 
static int generateHash (const var &key, int upperLimit) noexcept
 Generates a simple hash from a variant. More...
 
static int generateHash (const void *key, int upperLimit) noexcept
 Generates a simple hash from a void ptr. More...
 

Detailed Description

A simple class to generate hash functions for some primitive types, intended for use with the HashMap class.

See also
HashMap

Member Function Documentation

◆ generateHash() [1/7]

static int DefaultHashFunctions::generateHash ( uint32  key,
int  upperLimit 
)
staticnoexcept

Generates a simple hash from an unsigned int.

◆ generateHash() [2/7]

static int DefaultHashFunctions::generateHash ( int32  key,
int  upperLimit 
)
staticnoexcept

Generates a simple hash from an integer.

References generateHash().

Referenced by generateHash().

◆ generateHash() [3/7]

static int DefaultHashFunctions::generateHash ( uint64  key,
int  upperLimit 
)
staticnoexcept

Generates a simple hash from a uint64.

◆ generateHash() [4/7]

static int DefaultHashFunctions::generateHash ( int64  key,
int  upperLimit 
)
staticnoexcept

Generates a simple hash from an int64.

References generateHash().

Referenced by generateHash().

◆ generateHash() [5/7]

static int DefaultHashFunctions::generateHash ( const String key,
int  upperLimit 
)
staticnoexcept

Generates a simple hash from a string.

References generateHash().

Referenced by generateHash().

◆ generateHash() [6/7]

static int DefaultHashFunctions::generateHash ( const var key,
int  upperLimit 
)
staticnoexcept

Generates a simple hash from a variant.

References generateHash().

Referenced by generateHash().

◆ generateHash() [7/7]

static int DefaultHashFunctions::generateHash ( const void *  key,
int  upperLimit 
)
staticnoexcept

Generates a simple hash from a void ptr.

References generateHash().

Referenced by generateHash().


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