Functions
ValvulaHash: Thread Safe Hash table used inside Valvula Library.

Functions

void valvula_hash_clear (ValvulaHash *hash_table)
 Allows to clear a hash table. More...
 
axl_bool valvula_hash_delete (ValvulaHash *hash_table, axlPointer key)
 Allows to remove the provided key and its associated data on the provided hash without calling to the optionally associated destroy functions. More...
 
void valvula_hash_destroy (ValvulaHash *hash_table)
 Destroy the given hash freeing all resources. More...
 
axl_bool valvula_hash_exists (ValvulaHash *hash_table, axlPointer key)
 Allows to check if a key exists (without depending on its actual value). More...
 
void valvula_hash_foreach (ValvulaHash *hash_table, axlHashForeachFunc func, axlPointer user_data)
 Perform a foreach over all elements inside the ValvulaHash. More...
 
void valvula_hash_foreach2 (ValvulaHash *hash_table, axlHashForeachFunc2 func, axlPointer user_data, axlPointer user_data2)
 Perform a foreach over all elements inside the ValvulaHash, allowing to provide two user defined reference at the handler. More...
 
void valvula_hash_foreach3 (ValvulaHash *hash_table, axlHashForeachFunc3 func, axlPointer user_data, axlPointer user_data2, axlPointer user_data3)
 Perform a foreach over all elements inside the ValvulaHash, allowing to provide three user defined reference at the handler. More...
 
axlHashCursor * valvula_hash_get_cursor (ValvulaHash *hash_table)
 Allows to create a hash cursor from the provided hash. More...
 
void valvula_hash_insert (ValvulaHash *hash_table, axlPointer key, axlPointer value)
 Inserts a pair key/value inside the given ValvulaHash. More...
 
int valvula_hash_lock_until_changed (ValvulaHash *hash_table, long wait_microseconds)
 Allows the callers to get locked until a change is detected on the hash table (insert, update or remove operation) found or the wait period is reached (wait_microseconds). More...
 
axlPointer valvula_hash_lookup (ValvulaHash *hash_table, axlPointer key)
 Perform a lookup using the given key inside the given hash. More...
 
axlPointer valvula_hash_lookup_and_clear (ValvulaHash *hash_table, axlPointer key)
 Allows to get the data pointed by the provided key and removing it from the table in one step. More...
 
ValvulaHashvalvula_hash_new (axlHashFunc hash_func, axlEqualFunc key_equal_func)
 Creates a new ValvulaHash without providing destroy function. More...
 
ValvulaHashvalvula_hash_new_full (axlHashFunc hash_func, axlEqualFunc key_equal_func, axlDestroyFunc key_destroy_func, axlDestroyFunc value_destroy_func)
 Creates a new ValvulaHash setting all functions. More...
 
void valvula_hash_ref (ValvulaHash *hash_table)
 Allows to increase in one unit the reference counting on the hash table received. More...
 
axl_bool valvula_hash_remove (ValvulaHash *hash_table, axlPointer key)
 Removes the value index by the given key inside the given hash. More...
 
void valvula_hash_replace (ValvulaHash *hash_table, axlPointer key, axlPointer value)
 Replace using the given pair key/value into the given hash. More...
 
void valvula_hash_replace_full (ValvulaHash *hash_table, axlPointer key, axlDestroyFunc key_destroy, axlPointer value, axlDestroyFunc value_destroy)
 Replace using the given pair key/value into the given hash, providing the particular key and value destroy function, overrding default ones. More...
 
int valvula_hash_size (ValvulaHash *hash_table)
 Returns number of items insisde the hash. More...
 
void valvula_hash_unref (ValvulaHash *hash_table)
 Decrease reference counting and, if reached 0 reference a call to valvula_hash_destroy is done. More...
 

Detailed Description