[ Home ]

linklist.c File Reference

Generic Link List. More...

#include "linklist.h"
#include "../memory/memory.h"

Include dependency graph for linklist.c:


Functions

PUBLIC linkList_t * linkList_new (void)
 Create a new link list.
PUBLIC wtBoolean linkList_delete (linkList_t *list)
 Delete link list.
PUBLIC wtBoolean linkList_add (linkList_t *list, void *newElement)
 Add element to link list.
PUBLIC wtBoolean linkList_append (linkList_t *list, void *newElement)
 Add element to the end of the link list.
PUBLIC linkList_t * linkList_addList (linkList_t *list, void *newElement)
 Add element to link list.
PUBLIC linkList_t * linkList_appendList (linkList_t *list, void *newElement)
 Add element to end of link list.
PUBLIC wtBoolean linkList_removeNode (linkList_t *current, void *element)
 Remove node based on element.
PUBLIC wtBoolean linkList_quickRemoveNode (linkList_t *current, linkList_t *previous)
 Remove node.
PUBLIC wtBoolean linkList_deleteFull (linkList_t *list)
 Delete link list and elements.
PUBLIC 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

PUBLIC 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:

PUBLIC 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:

PUBLIC 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:

PUBLIC 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:

PUBLIC 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.

PUBLIC 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:

PUBLIC 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.

PUBLIC 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:

PUBLIC 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.

PUBLIC 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.