**************************************************************************/
/**
+ * @file
* Generic handle table.
*
* @author José Fonseca <jrfonseca@tungstengraphics.com>
/**
* Abstract data type to map integer handles to objects.
+ *
+ * Also referred as "pointer array".
*/
struct handle_table;
handle_table_add(struct handle_table *ht,
void *object);
+/**
+ * Returns zero on failure (out of memory).
+ */
+unsigned
+handle_table_set(struct handle_table *ht,
+ unsigned handle,
+ void *object);
+
/**
* Fetch an existing object.
*
handle_table_destroy(struct handle_table *ht);
+unsigned
+handle_table_get_first_handle(struct handle_table *ht);
+
+
+unsigned
+handle_table_get_next_handle(struct handle_table *ht,
+ unsigned handle);
+
+
#ifdef __cplusplus
}
#endif