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
00028 #ifndef CX_LIST_H
00029 #define CX_LIST_H
00030
00031 #include <cxmemory.h>
00032
00033 CX_BEGIN_DECLS
00034
00035 typedef struct _cx_lnode_ *cx_list_iterator;
00036 typedef const struct _cx_lnode_ *cx_list_const_iterator;
00037
00038 typedef struct _cx_list_ cx_list;
00039
00040
00041
00042
00043
00044
00045 cx_list *cx_list_new(void);
00046 void cx_list_delete(cx_list *);
00047 void cx_list_destroy(cx_list *, cx_free_func);
00048
00049
00050
00051
00052
00053 cxsize cx_list_size(const cx_list *);
00054 cxbool cx_list_empty(const cx_list *);
00055 cxsize cx_list_max_size(const cx_list *);
00056
00057
00058
00059
00060
00061 void cx_list_swap(cx_list *, cx_list *);
00062 cxptr cx_list_assign(cx_list *, cx_list_iterator, cxcptr);
00063
00064
00065
00066
00067
00068 cxptr cx_list_front(const cx_list *);
00069 cxptr cx_list_back(const cx_list *);
00070 cxptr cx_list_get(const cx_list *, cx_list_const_iterator);
00071
00072
00073
00074
00075
00076 cx_list_iterator cx_list_begin(const cx_list *);
00077 cx_list_iterator cx_list_end(const cx_list *);
00078 cx_list_iterator cx_list_next(const cx_list *, cx_list_const_iterator);
00079 cx_list_iterator cx_list_previous(const cx_list *, cx_list_const_iterator);
00080
00081
00082
00083
00084
00085 void cx_list_push_front(cx_list *, cxcptr);
00086 cxptr cx_list_pop_front(cx_list *);
00087 void cx_list_push_back(cx_list *, cxcptr);
00088 cxptr cx_list_pop_back(cx_list *);
00089
00090 cx_list_iterator cx_list_insert(cx_list *, cx_list_iterator, cxcptr);
00091 cx_list_iterator cx_list_erase(cx_list *, cx_list_iterator, cx_free_func);
00092 cxptr cx_list_extract(cx_list *, cx_list_iterator);
00093 void cx_list_remove(cx_list *, cxcptr);
00094 void cx_list_clear(cx_list *);
00095
00096
00097
00098
00099
00100 void cx_list_unique(cx_list *, cx_compare_func);
00101 void cx_list_splice(cx_list *, cx_list_iterator, cx_list *,
00102 cx_list_iterator, cx_list_iterator);
00103 void cx_list_merge(cx_list *, cx_list *, cx_compare_func);
00104 void cx_list_sort(cx_list *, cx_compare_func);
00105 void cx_list_reverse(cx_list *);
00106
00107 CX_END_DECLS
00108
00109 #endif