gdsl
1.7
|
Go to the source code of this file.
Typedefs | |
typedef struct hash_table * | gdsl_hash_t |
GDSL hashtable type. | |
typedef const char *(* | gdsl_key_func_t )(void *VALUE) |
GDSL hashtable key function type. | |
typedef ulong(* | gdsl_hash_func_t )(const char *KEY) |
GDSL hashtable hash function type. | |
Functions | |
ulong | gdsl_hash (const char *KEY) |
Computes a hash value from a NULL terminated character string. | |
gdsl_hash_t | gdsl_hash_alloc (const char *NAME, gdsl_alloc_func_t ALLOC_F, gdsl_free_func_t FREE_F, gdsl_key_func_t KEY_F, gdsl_hash_func_t HASH_F, ushort INITIAL_ENTRIES_NB) |
Create a new hashtable. | |
void | gdsl_hash_free (gdsl_hash_t H) |
Destroy a hashtable. | |
void | gdsl_hash_flush (gdsl_hash_t H) |
Flush a hashtable. | |
const char * | gdsl_hash_get_name (const gdsl_hash_t H) |
Get the name of a hashtable. | |
ushort | gdsl_hash_get_entries_number (const gdsl_hash_t H) |
Get the number of entries of a hashtable. | |
ushort | gdsl_hash_get_lists_max_size (const gdsl_hash_t H) |
Get the max number of elements allowed in each entry of a hashtable. | |
ushort | gdsl_hash_get_longest_list_size (const gdsl_hash_t H) |
Get the number of elements of the longest list entry of a hashtable. | |
ulong | gdsl_hash_get_size (const gdsl_hash_t H) |
Get the size of a hashtable. | |
double | gdsl_hash_get_fill_factor (const gdsl_hash_t H) |
Get the fill factor of a hashtable. | |
gdsl_hash_t | gdsl_hash_set_name (gdsl_hash_t H, const char *NEW_NAME) |
Set the name of a hashtable. | |
gdsl_element_t | gdsl_hash_insert (gdsl_hash_t H, void *VALUE) |
Insert an element into a hashtable (PUSH). | |
gdsl_element_t | gdsl_hash_remove (gdsl_hash_t H, const char *KEY) |
Remove an element from a hashtable (POP). | |
gdsl_hash_t | gdsl_hash_delete (gdsl_hash_t H, const char *KEY) |
Delete an element from a hashtable. | |
gdsl_hash_t | gdsl_hash_modify (gdsl_hash_t H, ushort NEW_ENTRIES_NB, ushort NEW_LISTS_MAX_SIZE) |
Increase the dimensions of a hashtable. | |
gdsl_element_t | gdsl_hash_search (const gdsl_hash_t H, const char *KEY) |
Search for a particular element into a hashtable (GET). | |
gdsl_element_t | gdsl_hash_map (const gdsl_hash_t H, gdsl_map_func_t MAP_F, void *USER_DATA) |
Parse a hashtable. | |
void | gdsl_hash_write (const gdsl_hash_t H, gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA) |
Write all the elements of a hashtable to a file. | |
void | gdsl_hash_write_xml (const gdsl_hash_t H, gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA) |
Write the content of a hashtable to a file into XML. | |
void | gdsl_hash_dump (const gdsl_hash_t H, gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA) |
Dump the internal structure of a hashtable to a file. |