Data Structures | Macros | Typedefs | Functions
Hash Table

Hash table management. More...

Data Structures

struct  _Eina_Hash_Tuple
 Data for a hash table of key/value pairs. More...
 

Macros

#define EINA_KEY_LENGTH(Function)   ((Eina_Key_Length)Function)
 
#define EINA_KEY_CMP(Function)   ((Eina_Key_Cmp)Function)
 
#define EINA_KEY_HASH(Function)   ((Eina_Key_Hash)Function)
 

Typedefs

typedef struct _Eina_Hash Eina_Hash
 Type for a generic hash table.
 
typedef struct _Eina_Hash_Tuple Eina_Hash_Tuple
 Type for a hash table of key/value pairs.
 
typedef unsigned int(* Eina_Key_Length) (const void *key)
 Type for a function to determine the length of a hash key.
 
typedef int(* Eina_Key_Cmp) (const void *key1, int key1_length, const void *key2, int key2_length)
 Type for a function to compare two hash keys.
 
typedef int(* Eina_Key_Hash) (const void *key, int key_length)
 Type for a function to create a hash key.
 
typedef Eina_Bool(* Eina_Hash_Foreach) (const Eina_Hash *hash, const void *key, void *data, void *fdata)
 Type for a function to iterate over a hash table.
 

Functions

EINA_API Eina_Hasheina_hash_new (Eina_Key_Length key_length_cb, Eina_Key_Cmp key_cmp_cb, Eina_Key_Hash key_hash_cb, Eina_Free_Cb data_free_cb, int buckets_power_size)
 Creates a new hash table.
 
EINA_API void eina_hash_free_cb_set (Eina_Hash *hash, Eina_Free_Cb data_free_cb)
 Sets the data cleanup callback for a hash.
 
EINA_API Eina_Hasheina_hash_string_djb2_new (Eina_Free_Cb data_free_cb)
 Creates a new hash table using the djb2 algorithm.
 
EINA_API Eina_Hasheina_hash_string_superfast_new (Eina_Free_Cb data_free_cb)
 Creates a new hash table for use with strings.
 
EINA_API Eina_Hasheina_hash_string_small_new (Eina_Free_Cb data_free_cb)
 Creates a new hash table for use with strings with small bucket size.
 
EINA_API Eina_Hasheina_hash_int32_new (Eina_Free_Cb data_free_cb)
 Creates a new hash table for use with 32bit integers.
 
EINA_API Eina_Hasheina_hash_int64_new (Eina_Free_Cb data_free_cb)
 Creates a new hash table for use with 64bit integers.
 
EINA_API Eina_Hasheina_hash_pointer_new (Eina_Free_Cb data_free_cb)
 Creates a new hash table for use with pointers.
 
EINA_API Eina_Hasheina_hash_stringshared_new (Eina_Free_Cb data_free_cb)