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 
00029 
00030 
00031 
00032 
00033 #ifndef __ANX_LIST_H__
00034 #define __ANX_LIST_H__
00035 
00040 #include <annodex/anx_core.h>
00041 
00045 typedef struct _AnxList AnxList;
00046 
00047 struct _AnxList {
00048   AnxList * prev;
00049   AnxList * next;
00050   void * data;
00051 };
00052 
00053 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00061 AnxList * anx_list_new (void);
00062 
00068 AnxList * anx_list_clone (AnxList * list);
00069 
00076 AnxList * anx_list_clone_with (AnxList * list, AnxCloneFunc clone);
00077 
00083 AnxList * anx_list_tail (AnxList * list);
00084 
00091 AnxList * anx_list_prepend (AnxList * list, void * data);
00092 
00099 AnxList * anx_list_append (AnxList * list, void * data);
00100 
00108 AnxList * anx_list_add_before (AnxList * list, void * data, AnxList * node);
00109 
00117 AnxList * anx_list_add_after (AnxList * list, void * data, AnxList * node);
00118 
00125 AnxList * anx_list_find (AnxList * list, void * data);
00126 
00133 AnxList * anx_list_remove (AnxList * list, AnxList * node);
00134 
00140 int anx_list_length (AnxList * list);
00141 
00147 int anx_list_is_empty (AnxList * list);
00148 
00154 int anx_list_is_singleton (AnxList * list);
00155 
00162 AnxList * anx_list_free_with (AnxList * list, AnxFreeFunc free_func);
00163 
00169 AnxList * anx_list_free (AnxList * list);
00170 
00171 #ifdef __cplusplus
00172 }
00173 #endif
00174 
00175 #endif