Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

mlist_tmpl_c.inc File Reference

data type independant list template. More...

#include "common.h"
#include <stdlib.h>
#include "xmalloc.h"
#include "assert.h"
#include "mlist_tmpl_h.inc"

Include dependency graph for mlist_tmpl_c.inc:

Include dependency graph

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

Included by dependency graph

Go to the source code of this file.


Detailed Description

data type independant list template.

This module contains a data type independant doubly linked list template. It can easily be customized for new data types by defining ML_LIST_NAME, which becomes the name of the new list "class", ML_FUNC_PFX, which is prepended to all function names listed below, and MlCargo which must expand to the actual data type to be stored in the list.
In case the list should store a non-integral data type like a struct the macro ML_INVALID must be defined whose value is returned as an error indicator by functions returning an MlCargo object. If undefined ML_INVALID is set to 0L which should be a reasonable default in many cases.
Following things can be defined optionally:

This can be done using a tiny adapter file, see chrlist.[ch] for an example.
All adapted list classes will benefit automatically and without any modification from bug fixes, improvements or new functions in this template.

Definition in file mlist_tmpl_c.inc.


Generated on Fri Jan 25 22:40:54 2002 for PDepp Webserver by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001