TeoCCl library  0.1.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
list.h
Go to the documentation of this file.
1 
11 #ifndef LIST_H
12 #define LIST_H
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 typedef struct ccl_list ccl_list_t;
19 
20 typedef struct node iter_list_t;
21 
22 ccl_list_t *cclListInit(const size_t data_size);
23 int cclListCount(const ccl_list_t *dllist);
24 int cclListEmpty(const ccl_list_t *dllist);
25 
26 iter_list_t *cclListGetIter(const ccl_list_t *dllist);
28 void *cclListIterData(iter_list_t *it);
29 
30 int cclListAddFirst(ccl_list_t *bllist, void *const data);
31 int cclListAddLast(ccl_list_t *bllist, void *const data);
32 int cclListAddAt(ccl_list_t *bllist, void *const data, const int idx);
33 
34 int cclListGetFirst(ccl_list_t *bllist, void *const data);
35 int cclListGetLast(ccl_list_t *bllist, void *const data);
36 int cclListGetAt(ccl_list_t *bllist, const int idx, void *const data);
37 
38 int cclListUpdateFirst(ccl_list_t *bllist, void *const data);
39 int cclListUpdateLast(ccl_list_t *bllist, void *const data);
40 int cclListUpdateAt(ccl_list_t *bllist, const int idx, void *const data);
41 
42 int cclListRemoveFirst(ccl_list_t *bllist);
43 int cclListRemoveLast(ccl_list_t *bllist);
44 int cclListRemoveAt(ccl_list_t *bllist, const int idx);
45 
46 void cclListClear(ccl_list_t *bllist);
47 void cclListDestroy(ccl_list_t *bllist);
48 
49 void cclSortListAdd(ccl_list_t *bllist, void *data, int (*cmp)(const void *, const void *));
50 /*
51 void cclListConcat(ccl_list_t **, ccl_list_t *);
52 void cclSortListMerge(ccl_list_t **, ccl_list_t *, int (*)(void *, void *));
53 */
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif
int cclListUpdateAt(ccl_list_t *bllist, const int idx, void *const data)
Definition: list.c:201
int cclListRemoveLast(ccl_list_t *bllist)
Definition: list.c:221
int cclListGetFirst(ccl_list_t *bllist, void *const data)
Definition: list.c:163
void * cclListIterData(iter_list_t *it)
Definition: list.c:72
int cclListAddLast(ccl_list_t *bllist, void *const data)
Definition: list.c:115
ccl_list_t * cclListInit(const size_t data_size)
Definition: list.c:30
iter_list_t * cclListIterNext(iter_list_t *it)
Definition: list.c:66
int cclListCount(const ccl_list_t *dllist)
Definition: list.c:48
iter_list_t * cclListGetIter(const ccl_list_t *dllist)
Definition: list.c:60
struct node iter_list_t
Definition: list.h:20
int cclListUpdateFirst(ccl_list_t *bllist, void *const data)
Definition: list.c:189
int cclListRemoveFirst(ccl_list_t *bllist)
Definition: list.c:215
int cclListUpdateLast(ccl_list_t *bllist, void *const data)
Definition: list.c:195
int cclListEmpty(const ccl_list_t *dllist)
Definition: list.c:54
int cclListAddFirst(ccl_list_t *bllist, void *const data)
Definition: list.c:109
void cclListDestroy(ccl_list_t *bllist)
Definition: list.c:271
struct ccl_list ccl_list_t
Definition: list.h:18
int cclListRemoveAt(ccl_list_t *bllist, const int idx)
Definition: list.c:227
int cclListGetLast(ccl_list_t *bllist, void *const data)
Definition: list.c:169
int cclListAddAt(ccl_list_t *bllist, void *const data, const int idx)
Definition: list.c:121
int cclListGetAt(ccl_list_t *bllist, const int idx, void *const data)
Definition: list.c:175
void cclSortListAdd(ccl_list_t *bllist, void *data, int(*cmp)(const void *, const void *))
Definition: list.c:278
void cclListClear(ccl_list_t *bllist)
Definition: list.c:255