INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
Data Structures | Typedefs | Functions
C:/cygwin/home/Javier/insee/src/list.h File Reference

Definitions for the double linked dinamic list. Used by Execution driven simulation module. More...

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

Go to the source code of this file.

Data Structures

struct  _ListElement
struct  _List

Typedefs

typedef struct _ListElement listElement
typedef struct _List list

Functions

void DestroyListElement (listElement *)
listElementCreateListElement (void *)
listElementAddBeforeElement (listElement *, void *)
listElementAddAfterElement (listElement *, void *)
void DestroyList (list **)
listCreateVoidList ()
void AddFirst (list *, void *)
void AddLast (list *, void *)
void * StartLoop (list *)
void * GetNext (list *)
int IsInList (list *, void *)
int ElementsInList (list *)
void RemoveFromList (list *, void *)
void PrintList (list *thisList)

Detailed Description

Definitions for the double linked dinamic list. Used by Execution driven simulation module.


Function Documentation

listElement* AddAfterElement ( listElement thisElement,
void *  dataPointer 
)

Adds an element after another one.

Parameters:
thisElementThe element to insert after.
dataPointerThe data of the element to insert.
Returns:
The inserted element.
listElement* AddBeforeElement ( listElement thisElement,
void *  dataPointer 
)

Adds an element before another one.

Parameters:
thisElementThe element to insert before.
dataPointerThe data of the element to insert.
Returns:
The inserted element.
void AddFirst ( list thisList,
void *  pointer 
)

Add an element at the begining of a list.

Parameters:
thisListThe list to insert into.
pointerThe data of the element to insert.
void AddLast ( list thisList,
void *  pointer 
)

Add an element at the end of a list.

Parameters:
thisListThe list to insert into.
pointerThe data of the element to insert.
listElement* CreateListElement ( void *  dataPointer)

Create a element to be inserted in the list.

Parameters:
dataPointerA pointer to the element data.
Returns:
The element.
list* CreateVoidList ( )

Creates an empty list.

Returns:
The empty list.
void DestroyList ( list **  theList)

Destroy a list.

Parameters:
theListThe lñist to destroy.
void DestroyListElement ( listElement thisElement)

Destroy an element.

Parameters:
thisElementThe element to destroy.
int ElementsInList ( list thisList)

Number of elements in the list.

Parameters:
thisListThe list to look in.
Returns:
The number of elements in the list.
void* GetNext ( list thisList)

Get an element of a list.

Parameters:
thisListThe list to get the next element.
Returns:
The element's data.
int IsInList ( list thisList,
void *  dataPointer 
)

Assert if data is in the list.

Parameters:
thisListThe list to look in.
dataPointerThe data to look for.
Returns:
TRUE/FALSE.
void PrintList ( list thisList)

Print the list.

Parameters:
thisListThe list to print.
void RemoveFromList ( list thisList,
void *  dataPointer 
)

Remove some data from a list.

Parameters:
thisListThe list to look in.
dataPointerThe data to remove.
void* StartLoop ( list thisList)

Start a loop in a list

Parameters:
thisListThe list to loop into.
Returns:
A pointer to the loop.