Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

hashtable.h File Reference


Detailed Description

Author:
Christian Biere
Date:
2006

#include "common.h"

Go to the source code of this file.

Typedefs

typedef hash_table hash_table_t
typedef void(* hash_table_foreach_func )(void *key, void *value, void *data)

Functions

hash_table_thash_table_new (void)
void hash_table_destroy (hash_table_t *ht)
size_t hash_table_size (const hash_table_t *ht)
 Checks how many items are currently in stored in the hash_table.
gboolean hash_table_insert (hash_table_t *ht, void *key, void *value)
 Adds a new item to the hash_table.
void hash_table_replace (hash_table_t *ht, void *key, void *value)
void * hash_table_lookup (hash_table_t *ht, void *key)
gboolean hash_table_remove (hash_table_t *ht, void *key)
void hash_table_foreach (hash_table_t *ht, hash_table_foreach_func func, void *data)


Typedef Documentation

typedef void(* hash_table_foreach_func)(void *key, void *value, void *data)
 

typedef struct hash_table hash_table_t
 


Function Documentation

void hash_table_destroy hash_table_t ht  ) 
 

void hash_table_foreach hash_table_t ht,
hash_table_foreach_func  func,
void *  data
 

gboolean hash_table_insert hash_table_t ht,
void *  key,
void *  value
 

Adds a new item to the hash_table.

If the hash_table already contains an item with the same key, the old value is kept and FALSE is returned.

Returns:
FALSE if the item could not be added, TRUE on success.

void* hash_table_lookup hash_table_t ht,
void *  key
 

hash_table_t* hash_table_new void   ) 
 

gboolean hash_table_remove hash_table_t ht,
void *  key
 

void hash_table_replace hash_table_t ht,
void *  key,
void *  value
 

size_t hash_table_size const hash_table_t ht  ) 
 

Checks how many items are currently in stored in the hash_table.

Parameters:
ht the hash_table to check.
Returns:
the number of items in the hash_table.


Generated on Sat Jun 30 17:53:27 2007 for gtk-gnutella by  doxygen 1.3.9.1