/*
** mg_id.h for  in 
** 
** Made by vianney rancurel
** Login   <vianney@epita.fr>
** 
** Started on  Wed Aug 25 12:06:08 1999 vianney rancurel
** Last update Thu Oct 28 20:17:48 1999 
*/
#ifndef MG_ID_H
#define MG_ID_H	1

#include "mg.h"

typedef struct			s_id
{
  t_vec				*ht;
} t_id;

typedef t_status		(*t_id_walk_proc) P((t_hash_elt *he,
						     VOID_PTR data));

/*
** You have to delete "value" before/after calling id_rm()
*/

/* PROTO mg_id.c */
/* mg_id.c */
t_id *id_new P((int base, int list_base, t_alloc_algorithm_proc alloc_algorithm_proc, t_alloc_proc alloc_proc, t_realloc_proc realloc_proc, t_free_proc free_proc, char *comment, t_status *status));
void id_destroy_elt P((t_hash_elt *he, void *data));
void id_destroy P((t_id *id));
void id_delete P((t_id *id));
int id_cmp P((void *key1, void *key2));
t_hash_elt *id_get P((t_id *id, void *key));
t_status id_add P((t_id *id, void *key, void *value));
t_status id_add_unique P((t_id *id, void *base_key, void *value, void **id_ret));
t_status id_override P((t_id *id, void *key, void *value));
t_status id_rm P((t_id *id, void *key));
t_boolean id_is_empty P((t_id *id));
int id_count P((t_id *id));
t_status id_walk P((t_id *id, t_id_walk_proc proc, void *data));
t_status id_to_vec_hash_elt P((t_id *id, t_vec *vec));
t_status id_walk_sorted_cmp P((t_id *id, t_id_walk_proc walk_proc, t_vec_cmp_proc cmp_proc, void *data));
int id_walk_sorted_cmpproc P((void **p1, void **p2));
t_status id_walk_sorted P((t_id *id, t_id_walk_proc proc, void *data));
t_status id_show_walk P((t_hash_elt *he));
void id_show P((t_id *id));
t_status id_add_with_unique_positive_int_key P((t_id *id, int base_key, void *value, int *id_ret));
t_status id_show_keys_as_ints_walk P((t_hash_elt *he));
void id_show_keys_as_ints P((t_id *id));
#endif
