00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __G_HASH_H__
00028 #define __G_HASH_H__
00029
00030 #include <g_types.h>
00031
00032 G_BEGIN_DECLS
00033
00034 typedef struct _GHashTable GHashTable;
00035
00036 typedef gboolean (*GHRFunc) (gpointer key,
00037 gpointer value,
00038 gpointer user_data);
00039
00040
00041
00042 GHashTable* g_hash_table_new (GHashFunc hash_func,
00043 GEqualFunc key_equal_func);
00044 void g_hash_table_destroy (GHashTable *hash_table);
00045 void g_hash_table_insert (GHashTable *hash_table,
00046 gpointer key,
00047 gpointer value);
00048 gboolean g_hash_table_remove (GHashTable *hash_table,
00049 gconstpointer key);
00050 gpointer g_hash_table_lookup (GHashTable *hash_table,
00051 gconstpointer key);
00052 gboolean g_hash_table_lookup_extended(GHashTable *hash_table,
00053 gconstpointer lookup_key,
00054 gpointer *orig_key,
00055 gpointer *value);
00056 void g_hash_table_foreach (GHashTable *hash_table,
00057 GHFunc func,
00058 gpointer user_data);
00059 guint g_hash_table_foreach_remove (GHashTable *hash_table,
00060 GHRFunc func,
00061 gpointer user_data);
00062 guint g_hash_table_size (GHashTable *hash_table);
00063
00064
00065
00066 void g_hash_table_freeze (GHashTable *hash_table);
00067 void g_hash_table_thaw (GHashTable *hash_table);
00068
00069
00070
00071 gboolean g_str_equal (gconstpointer v,
00072 gconstpointer v2);
00073 guint g_str_hash (gconstpointer v);
00074
00075 gboolean g_int_equal (gconstpointer v,
00076 gconstpointer v2) G_GNUC_CONST;
00077 guint g_int_hash (gconstpointer v) G_GNUC_CONST;
00078
00079
00080
00081
00082
00083
00084
00085 guint g_direct_hash (gconstpointer v) G_GNUC_CONST;
00086 gboolean g_direct_equal (gconstpointer v,
00087 gconstpointer v2) G_GNUC_CONST;
00088
00089 G_END_DECLS
00090
00091 #endif
00092