ArDrone SDK 1.8 added
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / ARDroneLib / VP_SDK / ATcodec / ATcodec_Sorted_List.h
1 /**
2  * @file ATcodec_Sorted_List.h
3  * @author aurelien.morelle@parrot.fr
4  * @date 2007/01/30
5  */
6
7 #ifndef _AT_CODEC_SORTED_LIST_INCLUDE_
8 #define _AT_CODEC_SORTED_LIST_INCLUDE_
9
10 typedef struct _ATcodec_Sorted_List_
11 {
12         void *head;
13
14         int nb;
15
16         size_t size;
17 }
18 ATcodec_Sorted_List_t;
19
20
21 typedef void (*ATcodec_element_processing)(void *element);
22
23
24 void
25 ATcodec_Sorted_List_init (ATcodec_Sorted_List_t *list, size_t size);
26
27 void
28 ATcodec_Sorted_List_destroy (ATcodec_Sorted_List_t *list);
29
30
31 void *
32 ATcodec_Sorted_List_headElement (ATcodec_Sorted_List_t *list);
33
34 void *
35 ATcodec_Sorted_List_tailElement (ATcodec_Sorted_List_t *list);
36
37 void *
38 ATcodec_Sorted_List_getElement (ATcodec_Sorted_List_t *list, unsigned int index);
39
40
41 void
42 ATcodec_Sorted_List_insertElement (ATcodec_Sorted_List_t *list, const void *element, int sortValue);
43
44 void
45 ATcodec_Sorted_List_removeElement (ATcodec_Sorted_List_t *list, void *element);
46
47
48 void
49 ATcodec_Sorted_List_batchProcess (ATcodec_Sorted_List_t *list, ATcodec_element_processing process_func);
50
51
52 #endif // ! _AT_CODEC_SORTED_LIST_INCLUDE_