This file contains prototype for the hashCode functions used in class HashMap. More...
#include <string>
#include <cstddef>
#include <cstdint>
#include <cstring>
Go to the source code of this file.
Functions | |
int | hashCode (int key) |
Returns a hash code for the specified key, which is always a nonnegative integer. More... | |
int | hashCode (bool key) |
int | hashCode (char key) |
int | hashCode (unsigned int key) |
int | hashCode (long key) |
int | hashCode (unsigned long key) |
int | hashCode (short key) |
int | hashCode (unsigned short key) |
int | hashCode (void *key) |
int | hashCode (const char *base, size_t numBytes) |
int | hashCode (const char *str) |
int | hashCode (const std::string &str) |
int | hashCode (double key) |
int | hashCode (float key) |
int | hashCode (long double key) |
This file contains prototype for the hashCode functions used in class HashMap.
Definition in file HashCode.h.
int hashCode | ( | bool | key | ) |
Definition at line 13 of file HashCode.cpp.
int hashCode | ( | char | key | ) |
Definition at line 17 of file HashCode.cpp.
int hashCode | ( | const char * | base, |
size_t | numBytes | ||
) |
Definition at line 52 of file HashCode.cpp.
int hashCode | ( | const char * | str | ) |
Definition at line 60 of file HashCode.cpp.
int hashCode | ( | const std::string & | str | ) |
Definition at line 64 of file HashCode.cpp.
int hashCode | ( | double | key | ) |
Definition at line 68 of file HashCode.cpp.
int hashCode | ( | float | key | ) |
Definition at line 72 of file HashCode.cpp.
int hashCode | ( | int | key | ) |
Returns a hash code for the specified key, which is always a nonnegative integer.
This function is overloaded to support all of the primitive types and the C++ string
type.
Definition at line 9 of file HashCode.cpp.
int hashCode | ( | long double | key | ) |
Definition at line 76 of file HashCode.cpp.
int hashCode | ( | long | key | ) |
Definition at line 25 of file HashCode.cpp.
int hashCode | ( | short | key | ) |
Definition at line 33 of file HashCode.cpp.
int hashCode | ( | unsigned int | key | ) |
Definition at line 21 of file HashCode.cpp.
int hashCode | ( | unsigned long | key | ) |
Definition at line 29 of file HashCode.cpp.
int hashCode | ( | unsigned short | key | ) |
Definition at line 37 of file HashCode.cpp.
int hashCode | ( | void * | key | ) |
Definition at line 48 of file HashCode.cpp.