Eneboo - Documentación para desarrolladores
|
00001 /* 00002 * Summary: lists interfaces 00003 * Description: this module implement the list support used in 00004 * various place in the library. 00005 * 00006 * Copy: See Copyright for the status of this software. 00007 * 00008 * Author: Gary Pennington <Gary.Pennington@uk.sun.com> 00009 */ 00010 00011 #ifndef __XML_LINK_INCLUDE__ 00012 #define __XML_LINK_INCLUDE__ 00013 00014 #include <libxml/xmlversion.h> 00015 00016 #ifdef __cplusplus 00017 extern "C" { 00018 #endif 00019 00020 typedef struct _xmlLink xmlLink; 00021 typedef xmlLink *xmlLinkPtr; 00022 00023 typedef struct _xmlList xmlList; 00024 typedef xmlList *xmlListPtr; 00025 00032 typedef void (*xmlListDeallocator) (xmlLinkPtr lk); 00042 typedef int (*xmlListDataCompare) (const void *data0, const void *data1); 00052 typedef int (*xmlListWalker) (const void *data, const void *user); 00053 00054 /* Creation/Deletion */ 00055 XMLPUBFUN xmlListPtr XMLCALL 00056 xmlListCreate (xmlListDeallocator deallocator, 00057 xmlListDataCompare compare); 00058 XMLPUBFUN void XMLCALL 00059 xmlListDelete (xmlListPtr l); 00060 00061 /* Basic Operators */ 00062 XMLPUBFUN void * XMLCALL 00063 xmlListSearch (xmlListPtr l, 00064 void *data); 00065 XMLPUBFUN void * XMLCALL 00066 xmlListReverseSearch (xmlListPtr l, 00067 void *data); 00068 XMLPUBFUN int XMLCALL 00069 xmlListInsert (xmlListPtr l, 00070 void *data) ; 00071 XMLPUBFUN int XMLCALL 00072 xmlListAppend (xmlListPtr l, 00073 void *data) ; 00074 XMLPUBFUN int XMLCALL 00075 xmlListRemoveFirst (xmlListPtr l, 00076 void *data); 00077 XMLPUBFUN int XMLCALL 00078 xmlListRemoveLast (xmlListPtr l, 00079 void *data); 00080 XMLPUBFUN int XMLCALL 00081 xmlListRemoveAll (xmlListPtr l, 00082 void *data); 00083 XMLPUBFUN void XMLCALL 00084 xmlListClear (xmlListPtr l); 00085 XMLPUBFUN int XMLCALL 00086 xmlListEmpty (xmlListPtr l); 00087 XMLPUBFUN xmlLinkPtr XMLCALL 00088 xmlListFront (xmlListPtr l); 00089 XMLPUBFUN xmlLinkPtr XMLCALL 00090 xmlListEnd (xmlListPtr l); 00091 XMLPUBFUN int XMLCALL 00092 xmlListSize (xmlListPtr l); 00093 00094 XMLPUBFUN void XMLCALL 00095 xmlListPopFront (xmlListPtr l); 00096 XMLPUBFUN void XMLCALL 00097 xmlListPopBack (xmlListPtr l); 00098 XMLPUBFUN int XMLCALL 00099 xmlListPushFront (xmlListPtr l, 00100 void *data); 00101 XMLPUBFUN int XMLCALL 00102 xmlListPushBack (xmlListPtr l, 00103 void *data); 00104 00105 /* Advanced Operators */ 00106 XMLPUBFUN void XMLCALL 00107 xmlListReverse (xmlListPtr l); 00108 XMLPUBFUN void XMLCALL 00109 xmlListSort (xmlListPtr l); 00110 XMLPUBFUN void XMLCALL 00111 xmlListWalk (xmlListPtr l, 00112 xmlListWalker walker, 00113 const void *user); 00114 XMLPUBFUN void XMLCALL 00115 xmlListReverseWalk (xmlListPtr l, 00116 xmlListWalker walker, 00117 const void *user); 00118 XMLPUBFUN void XMLCALL 00119 xmlListMerge (xmlListPtr l1, 00120 xmlListPtr l2); 00121 XMLPUBFUN xmlListPtr XMLCALL 00122 xmlListDup (const xmlListPtr old); 00123 XMLPUBFUN int XMLCALL 00124 xmlListCopy (xmlListPtr cur, 00125 const xmlListPtr old); 00126 /* Link operators */ 00127 XMLPUBFUN void * XMLCALL 00128 xmlLinkGetData (xmlLinkPtr lk); 00129 00130 /* xmlListUnique() */ 00131 /* xmlListSwap */ 00132 00133 #ifdef __cplusplus 00134 } 00135 #endif 00136 00137 #endif /* __XML_LINK_INCLUDE__ */