22 #ifndef __CCL_HEAP_H__
23 # define __CCL_HEAP_H__
31 typedef struct ccl_heap_st ccl_heap;
37 ccl_heap_create_with_data (
int size, ccl_compare_with_data_func *cmp,
41 ccl_heap_delete (ccl_heap *h);
49 # define ccl_heap_is_empty(h) (ccl_heap_get_size (h) == 0)
52 ccl_heap_get_size (
const ccl_heap *h);
55 ccl_heap_get_first (
const ccl_heap *h);
58 ccl_heap_take_first (ccl_heap *h);
61 ccl_heap_add (ccl_heap *h,
void *obj);
64 ccl_heap_has (
const ccl_heap *h,
void *obj);
67 ccl_heap_copy (ccl_heap *dst,
const ccl_heap *src);
71 void (*logproc) (
ccl_log_type log,
void *obj,
void *data),
Frequently used prototypes of generic functions.
int ccl_compare_func(const void *ptr1, const void *ptr2)
Prototype of functions used to order two objects pointed respectively by ptr1 and ptr2...
void ccl_delete_proc(void *ptr)
Prototype of procedures used to release the resources allocated to the object pointed by ptr...
Some useful and common macros.
enum ccl_log_type_enum ccl_log_type
Enum that indicates which kind of message has to be displayed. Each kind of message can be displayed ...