XanList Struct Reference

Doubly linked list. More...

#include <xanlib.h>

Collaboration diagram for XanList:
Collaboration graph
[legend]

Data Fields

void *(* alloc )(size_t size)
void(* free )(void *address)
void *(* clone )(void *data)
int len
XanListItemfirstItem
XanListItemlastItem
pthread_mutex_t itemsMutex
void(* synchAppendList )(struct XanList *list, struct XanList *listToAppend)
XanListItem *(* synchAppend )(struct XanList *list, void *data)
XanListItem *(* synchInsert )(struct XanList *list, void *data)
XanListItem *(* synchInsertBefore )(struct XanList *list, XanListItem *prev, void *data)
XanListItem *(* synchInsertAfter )(struct XanList *list, XanListItem *prev, void *data)
void(* synchDelete )(struct XanList *list, void *data)
void(* synchDeleteAll )(struct XanList *list, void *data)
void(* synchDeleteItem )(struct XanList *list, XanListItem *item)
XanListItem *(* synchFirst )(struct XanList *list)
XanListItem *(* synchLast )(struct XanList *list)
void(* synchDestroyList )(struct XanList *list)
void(* synchDestroyListAndData )(struct XanList *list)
void(* synchEmptyOutList )(struct XanList *list)
void *(* synchData )(struct XanList *list, XanListItem *item)
void **(* synchGetSlotData )(struct XanList *list, XanListItem *item)
XanListItem *(* synchNext )(struct XanList *list, XanListItem *item)
XanListItem *(* synchPrev )(struct XanList *list, XanListItem *item)
int(* synchLength )(struct XanList *list)
struct XanList *(* synchCloneList )(struct XanList *list)
void(* synchSetCloneFunction )(struct XanList *list, void *(*cloneFunction)(void *data))
void *(* synchGetCloneFunction )(struct XanList *list)
XanListItem *(* synchFind )(struct XanList *list, void *data)
int(* synchEqualsInstancesNumber )(struct XanList *list, void *data)
XanListItem *(* synchGetElementFromPositionNumber )(struct XanList *list, int positionNumber)
XanListItem *(* synchMoveToBegin )(struct XanList *list, XanListItem *item)
int(* synchContainsTheSameElements )(struct XanList *list, struct XanList *otherList)
int(* synchShareSomeElements )(struct XanList *list, struct XanList *otherList)
void(* synchDeleteClones )(struct XanList *list)
XanListItem *(* append )(struct XanList *list, void *data)
void(* appendList )(struct XanList *list, struct XanList *listToAppend)
XanListItem *(* insert )(struct XanList *list, void *data)
XanListItem *(* insertBefore )(struct XanList *list, XanListItem *prev, void *data)
XanListItem *(* insertAfter )(struct XanList *list, XanListItem *prev, void *data)
void(* delete )(struct XanList *list, void *data)
void(* deleteAll )(struct XanList *list, void *data)
void(* deleteItem )(struct XanList *list, XanListItem *item)
XanListItem *(* first )(struct XanList *list)
XanListItem *(* last )(struct XanList *list)
void(* destroyList )(struct XanList *list)
void(* destroyListAndData )(struct XanList *list)
void(* emptyOutList )(struct XanList *list)
void *(* data )(struct XanList *list, XanListItem *item)
void **(* getSlotData )(struct XanList *list, XanListItem *item)
XanListItem *(* next )(struct XanList *list, XanListItem *item)
XanListItem *(* prev )(struct XanList *list, XanListItem *item)
int(* length )(struct XanList *list)
struct XanList *(* cloneList )(struct XanList *list)
void(* setCloneFunction )(struct XanList *list, void *(*cloneFunction)(void *data))
void *(* getCloneFunction )(struct XanList *list)
XanListItem *(* find )(struct XanList *list, void *data)
int(* equalsInstancesNumber )(struct XanList *list, void *data)
XanListItem *(* getElementFromPositionNumber )(struct XanList *list, int positionNumber)
XanListItem *(* moveToBegin )(struct XanList *list, XanListItem *item)
int(* containsTheSameElements )(struct XanList *list, struct XanList *otherList)
int(* shareSomeElements )(struct XanList *list, struct XanList *otherList)
void(* deleteClones )(struct XanList *list)
void(* lock )(struct XanList *list)
void(* unlock )(struct XanList *list)

Detailed Description

Doubly linked list.

Doubly linked list containing pointers to user data with the ability to iterate over the list in both directions.

Definition at line 99 of file xanlib.h.


Field Documentation

void*(* XanList::alloc)(size_t size)

Alloc function of the list

Definition at line 102 of file xanlib.h.

Referenced by _xanListAppend(), _xanListCloneList(), _xanListInsert(), _xanListInsertAfter(), _xanListInsertBefore(), and xanListNew().

XanListItem*(* XanList::append)(struct XanList *list, void *data)

Remove from the list equals elements such that each one appear one time at most within the list. This operation is thread safe. Insert a new XanListItem containing the pointer stored inside the data parameter to the end of the list.

Definition at line 141 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::appendList)(struct XanList *list, struct XanList *listToAppend)

Append the list pointed by listToAppend to the list pointed by list parameter.

Definition at line 142 of file xanlib.h.

Referenced by xanListNew().

void*(* XanList::clone)(void *data)

Clone function of the list. It clones the data field stored addressed by the elements inside the list

Definition at line 104 of file xanlib.h.

Referenced by _xanListCloneList(), _xanListGetCloneFunction(), _xanListSetCloneFunction(), and xanListNew().

struct XanList*(* XanList::cloneList)(struct XanList *list) [read]

Return a new list cloned from the one given as input; the memory pointed by the user pointer stored inside the elements of the list is cloned by the clone function of the list.

Definition at line 159 of file xanlib.h.

Referenced by xanListNew().

int(* XanList::containsTheSameElements)(struct XanList *list, struct XanList *otherList)

Return 1 if the list 'otherList' contains the same elements of 'list', 0 otherwise.

Definition at line 166 of file xanlib.h.

Referenced by xanListNew().

void*(* XanList::data)(struct XanList *list, XanListItem *item)

Return the user pointer stored inside the element of the list given as input.

Definition at line 154 of file xanlib.h.

Referenced by _xanListDeleteItem(), _xanListMoveToBegin(), _xanPipeGet(), _xanPipeMoveToEnd(), _xanPipePut(), _xanPipePutAtEnd(), and xanListNew().

void(* XanList::delete)(struct XanList *list, void *data)

Delete the element in the list which stores the pointer equal to data.

Definition at line 146 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::deleteAll)(struct XanList *list, void *data)

Delete every element in the list which stores the pointer equal to data.

Definition at line 147 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::deleteClones)(struct XanList *list)

Definition at line 168 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::deleteItem)(struct XanList *list, XanListItem *item)

Delete the item from the list.

Definition at line 148 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::destroyList)(struct XanList *list)

Destroy the list calling the free function (it does not destroy the memory pointed by the user pointer stored inside each element of the list).

Definition at line 151 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::destroyListAndData)(struct XanList *list)

Destroy the list and each memory pointed by the user pointer stored inside each element of the list.

Definition at line 152 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::emptyOutList)(struct XanList *list)

Delete each element from the list.

Definition at line 153 of file xanlib.h.

Referenced by xanListNew().

int(* XanList::equalsInstancesNumber)(struct XanList *list, void *data)

Return the number of equals instances of data found in the list.

Definition at line 163 of file xanlib.h.

Referenced by _xanPipeMoveToEnd(), and xanListNew().

XanListItem*(* XanList::find)(struct XanList *list, void *data)

Return the XanListItem wrapping data if it find some element inside the list that contains it.

Definition at line 162 of file xanlib.h.

Referenced by _xanListDeleteItem(), _xanListMoveToBegin(), and xanListNew().

XanListItem*(* XanList::first)(struct XanList *list)

Return the head of the list.

Definition at line 149 of file xanlib.h.

Referenced by _xanPipeGet(), xanListNew(), and xanPipeGet().

void(* XanList::free)(void *address)
void*(* XanList::getCloneFunction)(struct XanList *list)

Return the clone function of the list.

Definition at line 161 of file xanlib.h.

Referenced by xanListNew().

XanListItem*(* XanList::getElementFromPositionNumber)(struct XanList *list, int positionNumber)

Return the element stored into the list in the position number positionNumber

Definition at line 164 of file xanlib.h.

Referenced by xanListNew().

void**(* XanList::getSlotData)(struct XanList *list, XanListItem *item)

Return the pointer of the user pointer stored inside the element of the list given as input.

Definition at line 155 of file xanlib.h.

Referenced by xanListNew().

XanListItem*(* XanList::insert)(struct XanList *list, void *data)

Insert a new XanListItem containing the pointer stored inside the data parameter to the head of the list.

Definition at line 143 of file xanlib.h.

Referenced by xanListNew().

Insert a new XanListItem containing the pointer stored inside the data parameter after the prev element of the list.

Definition at line 145 of file xanlib.h.

Referenced by xanListNew().

Insert a new XanListItem containing the pointer stored inside the data parameter before the prev element of the list.

Definition at line 144 of file xanlib.h.

Referenced by xanListNew().

pthread_mutex_t XanList::itemsMutex
XanListItem*(* XanList::last)(struct XanList *list)

Return the last element of the list

Definition at line 150 of file xanlib.h.

Referenced by xanListNew().

int(* XanList::length)(struct XanList *list)

Return the number of elements stored inside the list.

Definition at line 158 of file xanlib.h.

Referenced by _xanListMoveToBegin(), _xanNodeToInOrderList(), _xanNodeToPostOrderList(), _xanNodeToPreOrderList(), _xanPipeGet(), _xanPipeMoveToEnd(), xanListNew(), and xanPipeGet().

void(* XanList::lock)(struct XanList *list)

Remove from the list equals elements such that each one appear one time at most within the list. Lock the entire list

Definition at line 169 of file xanlib.h.

Referenced by xanListNew().

Move the item given as input at begin of the list.

Definition at line 165 of file xanlib.h.

Referenced by xanListNew().

XanListItem*(* XanList::next)(struct XanList *list, XanListItem *item)

Return the next element in the list from the one given as input.

Definition at line 156 of file xanlib.h.

Referenced by _xanPipeGet(), xanListNew(), and xanPipeGet().

XanListItem*(* XanList::prev)(struct XanList *list, XanListItem *item)

Return the previous element in the list from the one given as input.

Definition at line 157 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::setCloneFunction)(struct XanList *list, void *(*cloneFunction)(void *data))

Set the clone function of the list.

Definition at line 160 of file xanlib.h.

Referenced by _xanNodeSetCloneFunction(), and xanListNew().

int(* XanList::shareSomeElements)(struct XanList *list, struct XanList *otherList)

Return 1 if the two lists in input share one element at least, 0 otherwise.

Definition at line 167 of file xanlib.h.

Referenced by xanListNew().

XanListItem*(* XanList::synchAppend)(struct XanList *list, void *data)

Insert a new XanListItem containing the pointer stored inside the data parameter to the end of the list. This operation is act only after taked the lock to the list.

Definition at line 112 of file xanlib.h.

Referenced by _xanPipePut(), _xanPipePutAtEnd(), and xanListNew().

void(* XanList::synchAppendList)(struct XanList *list, struct XanList *listToAppend)

Append the list pointed by listToAppend to the list pointed by list parameter. This operation is act only after taked the lock to the list.

Definition at line 111 of file xanlib.h.

Referenced by xanListNew().

struct XanList*(* XanList::synchCloneList)(struct XanList *list) [read]

Return a new list cloned from the one given as input; the memory pointed by the user pointer stored inside the elements of the list is cloned by the clone function of the list. This operation is act only after taked the lock to the list.

Definition at line 129 of file xanlib.h.

Referenced by xanListNew().

int(* XanList::synchContainsTheSameElements)(struct XanList *list, struct XanList *otherList)

Return 1 if the list 'otherList' contains the same elements of 'list', 0 otherwise. This operation is act only after taked the lock to the list.

Definition at line 136 of file xanlib.h.

Referenced by xanListNew().

void*(* XanList::synchData)(struct XanList *list, XanListItem *item)

Return the user pointer stored inside the element of the list given as input. This operation is act only after taked the lock to the list.

Definition at line 124 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::synchDelete)(struct XanList *list, void *data)

Delete the element in the list which stores the pointer equal to data. This operation is act only after taked the lock to the list.

Definition at line 116 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::synchDeleteAll)(struct XanList *list, void *data)

Delete every element in the list which stores the pointer equal to data. This operation is act only after taked the lock to the list.

Definition at line 117 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::synchDeleteClones)(struct XanList *list)

Definition at line 138 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::synchDeleteItem)(struct XanList *list, XanListItem *item)

Delete the item from the list. This operation is act only after taked the lock to the list.

Definition at line 118 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::synchDestroyList)(struct XanList *list)

Destroy the list calling the free function (it does not destroy the memory pointed by the user pointer stored inside each element of the list). This operation is act only after taked the lock to the list.

Definition at line 121 of file xanlib.h.

Referenced by xanListNew().

Destroy the list and each memory pointed by the user pointer stored inside each element of the list. This operation is act only after taked the lock to the list.

Definition at line 122 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::synchEmptyOutList)(struct XanList *list)

Delete each element from the list. This operation is act only after taked the lock to the list.

Definition at line 123 of file xanlib.h.

Referenced by xanListNew().

int(* XanList::synchEqualsInstancesNumber)(struct XanList *list, void *data)

Return the number of equals instances of data found in the list. This operation is act only after taked the lock to the list.

Definition at line 133 of file xanlib.h.

Referenced by xanListNew().

XanListItem*(* XanList::synchFind)(struct XanList *list, void *data)

Return the XanListItem wrapping data if it find some element inside the list that contains it. This operation is act only after taked the lock to the list.

Definition at line 132 of file xanlib.h.

Referenced by xanListNew().

Return the head of the list. This operation is act only after taked the lock to the list.

Definition at line 119 of file xanlib.h.

Referenced by xanListNew().

void*(* XanList::synchGetCloneFunction)(struct XanList *list)

Return the clone function of the list. This operation is act only after taked the lock to the list.

Definition at line 131 of file xanlib.h.

Referenced by xanListNew().

XanListItem*(* XanList::synchGetElementFromPositionNumber)(struct XanList *list, int positionNumber)

Return the element stored into the list in the position number positionNumber. This operation is act only after taked the lock to the list.

Definition at line 134 of file xanlib.h.

Referenced by xanListNew().

void**(* XanList::synchGetSlotData)(struct XanList *list, XanListItem *item)

Return the pointer of the user pointer stored inside the element of the list given as input. This operation is act only after taked the lock to the list.

Definition at line 125 of file xanlib.h.

Referenced by xanListNew().

XanListItem*(* XanList::synchInsert)(struct XanList *list, void *data)

Insert a new XanListItem containing the pointer stored inside the data parameter to the head of the list. This operation is act only after taked the lock to the list.

Definition at line 113 of file xanlib.h.

Referenced by xanListNew().

Insert a new XanListItem containing the pointer stored inside the data parameter after the prev element of the list. This operation is act only after taked the lock to the list.

Definition at line 115 of file xanlib.h.

Referenced by xanListNew().

Insert a new XanListItem containing the pointer stored inside the data parameter before the prev element of the list. This operation is act only after taked the lock to the list.

Definition at line 114 of file xanlib.h.

Referenced by xanListNew().

Return the last element of the list. This operation is act only after taked the lock to the list.

Definition at line 120 of file xanlib.h.

Referenced by xanListNew().

int(* XanList::synchLength)(struct XanList *list)

Return the number of elements stored inside the list. This operation is act only after taked the lock to the list.

Definition at line 128 of file xanlib.h.

Referenced by xanListNew().

Move the item given as input at begin of the list. This operation is act only after taked the lock to the list.

Definition at line 135 of file xanlib.h.

Referenced by xanListNew().

Return the next element in the list from the one given as input. This operation is act only after taked the lock to the list.

Definition at line 126 of file xanlib.h.

Referenced by xanListNew().

Return the previous element in the list from the one given as input. This operation is act only after taked the lock to the list.

Definition at line 127 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::synchSetCloneFunction)(struct XanList *list, void *(*cloneFunction)(void *data))

Set the clone function of the list. This operation is act only after taked the lock to the list.

Definition at line 130 of file xanlib.h.

Referenced by xanListNew().

int(* XanList::synchShareSomeElements)(struct XanList *list, struct XanList *otherList)

Return 1 if the two lists in input share one element at least, 0 otherwise. This operation is thread safe.

Definition at line 137 of file xanlib.h.

Referenced by xanListNew().

void(* XanList::unlock)(struct XanList *list)

Unlock the entire list

Definition at line 170 of file xanlib.h.

Referenced by xanListNew().


The documentation for this struct was generated from the following file:
Generated on Mon Apr 26 15:54:47 2010 for xanlib by  doxygen 1.6.3