Data Structures | Typedefs | Functions

List - List maintains a linked list of character strings as a stack.
[Supporting Modules]

Data Structures

struct  node
struct  head

Typedefs

typedef struct node Node
typedef struct head Head
typedef Node ** ListIterator
typedef HeadList

Functions

List newList ()
void freeList (List l)
void insertList (char *item, List l)
int getLengthList (List l)
ListIterator newListIterator (List l)
char * listIteratorNext (ListIterator li)
int endOfList (ListIterator li)

Typedef Documentation

typedef struct head Head

Head of linked list

typedef Head* List

A list of items.

typedef Node** ListIterator

Iterator through a linked list. Operations on the iterator take care of advancing the pointers and checking for null pointers.

typedef struct node Node

Element of a linked list


Function Documentation

int endOfList ( ListIterator  li  ) 

Check if iterator is at the end of the list.

Parameters:
[in] li A List Iterator.
Returns:
TRUE if the List Iterator is at the end of its list.
void freeList ( List  l  ) 

Free the memory for a list of nodes.

Parameters:
[in,out] l A List to free.
int getLengthList ( List  l  ) 

Return the number of nodes in a list.

Parameters:
[in] l A List
void insertList ( char *  item,
List  l 
)

Insert item at the head of List

Parameters:
[in] item Pointer to a character string to store in the list
[in,out] l Add to this list
char* listIteratorNext ( ListIterator  li  ) 

Get the next character string stored in the List.

Parameters:
[in,out] li A ListIterator.
Returns:
The character string next in the list.
List newList (  ) 

Create a new list.

Returns:
A new List.
ListIterator newListIterator ( List  l  ) 

Create an iterator to traverse a list.

Parameters:
[in] l A List to traverse
Returns:
A ListIterator that allows access to the nodes in the List.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines