|
libxml2
|
lists interfaces More...
Typedefs | |
| typedef struct _xmlLink | xmlLink |
| Linked list item. | |
| typedef struct _xmlList | xmlList |
| Linked list. | |
| typedef void(* | xmlListDeallocator) (xmlLink *lk) |
| Callback function used to free data from a list. | |
| typedef int(* | xmlListDataCompare) (const void *data0, const void *data1) |
| Callback function used to compare 2 data. | |
| typedef int(* | xmlListWalker) (const void *data, void *user) |
| Callback function used when walking a list with xmlListWalk. | |
Functions | |
| xmlList * | xmlListCreate (xmlListDeallocator deallocator, xmlListDataCompare compare) |
| Create a new list. | |
| void | xmlListDelete (xmlList *l) |
| Deletes the list and its associated data. | |
| void * | xmlListSearch (xmlList *l, void *data) |
| Search the list for an existing value of data | |
| void * | xmlListReverseSearch (xmlList *l, void *data) |
| Search the list in reverse order for an existing value of data | |
| int | xmlListInsert (xmlList *l, void *data) |
| Insert data in the ordered list at the beginning for this value. | |
| int | xmlListAppend (xmlList *l, void *data) |
| Insert data in the ordered list at the end for this value. | |
| int | xmlListRemoveFirst (xmlList *l, void *data) |
| Remove the first instance associated to data in the list. | |
| int | xmlListRemoveLast (xmlList *l, void *data) |
| Remove the last instance associated to data in the list. | |
| int | xmlListRemoveAll (xmlList *l, void *data) |
| Remove the all instance associated to data in the list. | |
| void | xmlListClear (xmlList *l) |
| Remove the all data in the list. | |
| int | xmlListEmpty (xmlList *l) |
| Is the list empty ? | |
| xmlLink * | xmlListFront (xmlList *l) |
| Get the first element in the list. | |
| xmlLink * | xmlListEnd (xmlList *l) |
| Get the last element in the list. | |
| int | xmlListSize (xmlList *l) |
| Get the number of elements in the list. | |
| void | xmlListPopFront (xmlList *l) |
| Removes the first element in the list. | |
| void | xmlListPopBack (xmlList *l) |
| Removes the last element in the list. | |
| int | xmlListPushFront (xmlList *l, void *data) |
| add the new data at the beginning of the list | |
| int | xmlListPushBack (xmlList *l, void *data) |
| add the new data at the end of the list | |
| void | xmlListReverse (xmlList *l) |
| Reverse the order of the elements in the list. | |
| void | xmlListSort (xmlList *l) |
| Sort all the elements in the list. | |
| void | xmlListWalk (xmlList *l, xmlListWalker walker, void *user) |
| Walk all the element of the first from first to last and apply the walker function to it. | |
| void | xmlListReverseWalk (xmlList *l, xmlListWalker walker, void *user) |
| Walk all the element of the list in reverse order and apply the walker function to it. | |
| void | xmlListMerge (xmlList *l1, xmlList *l2) |
| include all the elements of the second list in the first one and clear the second list | |
| xmlList * | xmlListDup (xmlList *old) |
| Duplicate the list. | |
| int | xmlListCopy (xmlList *cur, xmlList *old) |
| Move all the element from the old list in the new list. | |
| void * | xmlLinkGetData (xmlLink *lk) |
| See Returns. | |
lists interfaces
this module implement the list support used in various place in the library.
| typedef struct _xmlLink xmlLink |
Linked list item.
| typedef struct _xmlList xmlList |
Linked list.
| typedef int(* xmlListDataCompare) (const void *data0, const void *data1) |
Callback function used to compare 2 data.
| data0 | the first data |
| data1 | the second data |
| typedef void(* xmlListDeallocator) (xmlLink *lk) |
Callback function used to free data from a list.
| lk | the data to deallocate |
| typedef int(* xmlListWalker) (const void *data, void *user) |
Callback function used when walking a list with xmlListWalk.
| data | the data found in the list |
| user | extra user provided data to the walker |
| void * xmlLinkGetData | ( | xmlLink * | lk | ) |
See Returns.
| lk | a link |
| int xmlListAppend | ( | xmlList * | l, |
| void * | data ) |
Insert data in the ordered list at the end for this value.
| l | a list |
| data | the data |
| void xmlListClear | ( | xmlList * | l | ) |
Remove the all data in the list.
| l | a list |
Move all the element from the old list in the new list.
| cur | the new list |
| old | the old list |
| xmlList * xmlListCreate | ( | xmlListDeallocator | deallocator, |
| xmlListDataCompare | compare ) |
Create a new list.
| deallocator | an optional deallocator function |
| compare | an optional comparison function |
| void xmlListDelete | ( | xmlList * | l | ) |
Deletes the list and its associated data.
| l | a list |
Duplicate the list.
| old | the list |
| int xmlListEmpty | ( | xmlList * | l | ) |
Is the list empty ?
| l | a list |
Get the last element in the list.
| l | a list |
Get the first element in the list.
| l | a list |
| int xmlListInsert | ( | xmlList * | l, |
| void * | data ) |
Insert data in the ordered list at the beginning for this value.
| l | a list |
| data | the data |
include all the elements of the second list in the first one and clear the second list
| l1 | the original list |
| l2 | the new list |
| void xmlListPopBack | ( | xmlList * | l | ) |
Removes the last element in the list.
| l | a list |
| void xmlListPopFront | ( | xmlList * | l | ) |
Removes the first element in the list.
| l | a list |
| int xmlListPushBack | ( | xmlList * | l, |
| void * | data ) |
add the new data at the end of the list
| l | a list |
| data | new data |
| int xmlListPushFront | ( | xmlList * | l, |
| void * | data ) |
add the new data at the beginning of the list
| l | a list |
| data | new data |
| int xmlListRemoveAll | ( | xmlList * | l, |
| void * | data ) |
Remove the all instance associated to data in the list.
| l | a list |
| data | list data |
| int xmlListRemoveFirst | ( | xmlList * | l, |
| void * | data ) |
Remove the first instance associated to data in the list.
| l | a list |
| data | list data |
| int xmlListRemoveLast | ( | xmlList * | l, |
| void * | data ) |
Remove the last instance associated to data in the list.
| l | a list |
| data | list data |
| void xmlListReverse | ( | xmlList * | l | ) |
Reverse the order of the elements in the list.
| l | a list |
| void * xmlListReverseSearch | ( | xmlList * | l, |
| void * | data ) |
Search the list in reverse order for an existing value of data
| l | a list |
| data | a search value |
| void xmlListReverseWalk | ( | xmlList * | l, |
| xmlListWalker | walker, | ||
| void * | user ) |
Walk all the element of the list in reverse order and apply the walker function to it.
| l | a list |
| walker | a processing function |
| user | a user parameter passed to the walker function |
| void * xmlListSearch | ( | xmlList * | l, |
| void * | data ) |
Search the list for an existing value of data
| l | a list |
| data | a search value |
| int xmlListSize | ( | xmlList * | l | ) |
Get the number of elements in the list.
| l | a list |
| void xmlListSort | ( | xmlList * | l | ) |
Sort all the elements in the list.
| l | a list |
| void xmlListWalk | ( | xmlList * | l, |
| xmlListWalker | walker, | ||
| void * | user ) |
Walk all the element of the first from first to last and apply the walker function to it.
| l | a list |
| walker | a processing function |
| user | a user parameter passed to the walker function |