[ Home ]

linklist.h File Reference

Generic Link List. More...

#include "platform.h"
#include "common_utils.h"

Include dependency graph for linklist.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  linkList_s

Defines

#define linkList_GetNextElement(x)   ( (x) && ((x) = (x)->next) ? (x)->element : NULL )

Typedefs

typedef struct linkList_s linkList_t

Functions

linkList_t * linkList_new (void)
 Create a new link list.
wtBoolean linkList_delete (linkList_t *list)
 Delete link list.
wtBoolean linkList_deleteFull (linkList_t *list)
 Delete link list and elements.
wtBoolean linkList_add (linkList_t *list, void *newElement)
 Add element to link list.
wtBoolean linkList_append (linkList_t *list, void *newElement)
 Add element to the end of the link list.
linkList_t * linkList_addList (linkList_t *list, void *newElement)
 Add element to link list.
linkList_t * linkList_appendList (linkList_t *list, void *newElement)
 Add element to end of link list.
wtBoolean linkList_removeNode (linkList_t *current, void *element)
 Remove node based on element.
wtBoolean linkList_quickRemoveNode (linkList_t *current, linkList_t *previous)
 Remove node.
W32 linkList_count (linkList_t *list)
 Counts the numer of elements in link list.


Detailed Description

Generic Link List.

Author:
Michael Liebscher
Date:
2005

Function Documentation

wtBoolean linkList_add ( linkList_t *  list,
void *  newElement 
)

Add element to link list.

Parameters:
[in] list Pointer to linkList_t structure.
[in] newElement Element to add to link list.
Returns:
On success true, otherwise false.

Here is the caller graph for this function:

linkList_t* linkList_addList ( linkList_t *  list,
void *  newElement 
)

Add element to link list.

Parameters:
[in] list Pointer to linkList_t structure.
[in] newElement Element to add to link list.
Returns:
On success pointer to newly added node, otherwise NULL.

Here is the caller graph for this function:

wtBoolean linkList_append ( linkList_t *  list,
void *  newElement 
)

Add element to the end of the link list.

Parameters:
[in] list Pointer to linkList_t structure.
[in] newElement Element to add to link list.
Returns:
On success true, otherwise false.

Here is the call graph for this function:

linkList_t* linkList_appendList ( linkList_t *  list,
void *  newElement 
)

Add element to end of link list.

Parameters:
[in] list Pointer to linkList_t structure.
[in] newElement Element to add to link list.
Returns:
On success pointer to newly added node, otherwise NULL.

Here is the call graph for this function:

W32 linkList_count ( linkList_t *  list  ) 

Counts the numer of elements in link list.

Parameters:
[in] list Pointer to linkList_t structure.
Returns:
Returns the numer of elements in the link list.

wtBoolean linkList_delete ( linkList_t *  list  ) 

Delete link list.

Parameters:
[in] list Pointer to linkList_t structure.
Returns:
On success true, otherwise false.

Here is the caller graph for this function:

wtBoolean linkList_deleteFull ( linkList_t *  list  ) 

Delete link list and elements.

Parameters:
[in] list Pointer to linkList_t structure.
Returns:
On success true, otherwise false.

linkList_t* linkList_new ( void   ) 

Create a new link list.

Returns:
Pointer to new link list structure.

Here is the caller graph for this function:

wtBoolean linkList_quickRemoveNode ( linkList_t *  current,
linkList_t *  previous 
)

Remove node.

Parameters:
[in] current Node to remove.
[in] previous Previous Node in chain.
Returns:
On success true, otherwise false.

wtBoolean linkList_removeNode ( linkList_t *  current,
void *  element 
)

Remove node based on element.

Parameters:
[in] list Pointer to linkList_t structure.
[in] element Pointer to element of node to remove.
Returns:
On success true, otherwise false.