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 __ALICEML_LIST_H__
00028 #define __ALICEML_LIST_H__
00029
00030 #include "aliceml.h"
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00039 typedef struct ML_ListNode ML_ListNode;
00040
00044 typedef struct ML_List ML_List;
00045
00049 typedef struct ML_ListIt {
00050 ML_ListNode *node;
00051 } ML_ListIt;
00052
00054 ALICEMLAPI ML_List * ALICEMLCALL
00055 ML_List_Create(ML_Callback_Insert insert, ML_Callback_Remove remove);
00056
00058 ALICEMLAPI void ALICEMLCALL
00059 ML_List_Destroy(ML_List *self);
00060
00062 ALICEMLAPI ML_size ALICEMLCALL
00063 ML_List_GetSize(ML_List *self);
00064
00066 ALICEMLAPI void ALICEMLCALL
00067 ML_List_Clear(ML_List *self);
00068
00070 ALICEMLAPI int ALICEMLCALL
00071 ML_List_Insert(ML_List *self, ML_ListIt where, void *ptr);
00072
00074 ALICEMLAPI int ALICEMLCALL
00075 ML_List_Erase(ML_List *self, ML_ListIt where);
00076
00078 ALICEMLAPI int ALICEMLCALL
00079 ML_List_PushFront(ML_List *self, void *ptr);
00080
00082 ALICEMLAPI int ALICEMLCALL
00083 ML_List_PushBack(ML_List *self, void *ptr);
00084
00086 ALICEMLAPI int ALICEMLCALL
00087 ML_List_PopFront(ML_List *self);
00088
00090 ALICEMLAPI int ALICEMLCALL
00091 ML_List_PopBack(ML_List *self);
00092
00094 ALICEMLAPI ML_ListIt ALICEMLCALL
00095 ML_List_GetBegin(ML_List *self);
00096
00098 ALICEMLAPI ML_ListIt ALICEMLCALL
00099 ML_List_GetEnd(ML_List *self);
00100
00102 ALICEMLAPI ML_bool ALICEMLCALL
00103 ML_List_IsBegin(ML_List *self, ML_ListIt it);
00104
00106 ALICEMLAPI ML_bool ALICEMLCALL
00107 ML_List_IsEnd(ML_List *self, ML_ListIt it);
00108
00110 ALICEMLAPI ML_ListIt ALICEMLCALL
00111 ML_List_Find(ML_List *self, void *ptr);
00112
00114 ALICEMLAPI ML_ListIt ALICEMLCALL
00115 ML_List_FindIf(ML_List *self, ML_Comparator compare, void *ptr);
00116
00118 ALICEMLAPI ML_ListIt ALICEMLCALL
00119 ML_ListIt_Next(ML_ListIt it);
00120
00122 ALICEMLAPI ML_ListIt ALICEMLCALL
00123 ML_ListIt_Prev(ML_ListIt it);
00124
00126 ALICEMLAPI void * ALICEMLCALL
00127 ML_ListIt_Get(ML_ListIt it);
00128
00130 ALICEMLAPI ML_bool ALICEMLCALL
00131 ML_ListIt_IsEqual(ML_ListIt x, ML_ListIt y);
00132
00133 #ifdef __cplusplus
00134 }
00135 #endif
00136
00137 #endif