Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

list.h: linked list routines
[platform independant portions of code]


Typedefs

typedef _List * List
typedef _ListIterator * ListIterator
typedef Boolean(* ListComparator )(Pointer key, Pointer data)

Functions

ErrorCode listCreate (List *list)
ErrorCode listDestroy (List *list)
ErrorCode listAddFront (List list, Pointer data)
ErrorCode listAddBack (List list, Pointer data)
ErrorCode listRemove (List list, Pointer data)
ErrorCode listGetLength (List list, uint32 *length)
ErrorCode listGetFirst (List list, Pointer *data)
ErrorCode listGetLast (List list, Pointer *data)
ErrorCode listFind (List list, ListComparator comparator, Pointer key, Pointer *data)
ErrorCode listIteratorCreate (ListIterator *li, List list)
ErrorCode listIteratorReset (ListIterator li)
ErrorCode listIteratorGetNext (ListIterator li, Pointer *data)
ErrorCode listIteratorGetPrevious (ListIterator li, Pointer *data)
ErrorCode listIteratorDestroy (ListIterator *li)

Detailed Description

 *  *  * Defines interfaces for working with lists of data

Typedef Documentation

typedef struct _List* List
 

Definition at line 25 of file list.h.

typedef Boolean(* ListComparator)(Pointer key, Pointer data)
 

Definition at line 28 of file list.h.

typedef struct _ListIterator* ListIterator
 

Definition at line 26 of file list.h.


Function Documentation

ErrorCode listAddBack List  list,
Pointer  data
 

Add an item to the linked list at the back/tail

ErrorCode listAddFront List  list,
Pointer  data
 

Add an item to the linked list at the front/head

ErrorCode listCreate List list  ) 
 

Creates a doubly-linked list

ErrorCode listDestroy List list  ) 
 

Delete a doubly-linked list

ErrorCode listFind List  list,
ListComparator  comparator,
Pointer  key,
Pointer data
 

Attempt to find an item in the list

ErrorCode listGetFirst List  list,
Pointer data
 

Get the first node in the list

ErrorCode listGetLast List  list,
Pointer data
 

Get the last node in the list

ErrorCode listGetLength List  list,
uint32 length
 

Get the total number of items in this list

ErrorCode listIteratorCreate ListIterator li,
List  list
 

Create an iterator for a list

ErrorCode listIteratorDestroy ListIterator li  ) 
 

Destroy a list iterator

ErrorCode listIteratorGetNext ListIterator  li,
Pointer data
 

Get the next node in the list

ErrorCode listIteratorGetPrevious ListIterator  li,
Pointer data
 

Get the previous node in the list

ErrorCode listIteratorReset ListIterator  li  ) 
 

Reset the iterator to point to the beginning on the list. Can be called at any time, even if the list has changed after the iterator was created

ErrorCode listRemove List  list,
Pointer  data
 

Remove an item from the list


Generated on Wed Mar 22 20:36:34 2006 for ndk by  doxygen 1.4.4