17 |
/* along with this program; if not, write to the Free Software */ |
/* along with this program; if not, write to the Free Software */ |
18 |
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
19 |
|
|
|
/* |
|
|
* $Id$ |
|
|
*/ |
|
|
|
|
20 |
/** |
/** |
21 |
* \file alist.h |
* \file alist.h |
22 |
* \brief List type used by automaton |
* \brief List type used by automaton |
23 |
* \author Antoine Fraboulet |
* \author Antoine Fraboulet |
24 |
* \date 2005 |
* \date 2005 |
25 |
*/ |
*/ |
27 |
#ifndef _ALIST_H_ |
#ifndef _ALIST_H_ |
28 |
#define _ALIST_H_ |
#define _ALIST_H_ |
29 |
#if defined(__cplusplus) |
#if defined(__cplusplus) |
30 |
extern "C" |
extern "C" |
31 |
{ |
{ |
32 |
#endif |
#endif |
33 |
|
|
34 |
/** |
/** |
35 |
* untyped list type element |
* untyped list type element |
42 |
* what the value type is |
* what the value type is |
43 |
*/ |
*/ |
44 |
void* alist_elt_get_value(alist_elt); |
void* alist_elt_get_value(alist_elt); |
45 |
|
|
46 |
/** |
/** |
47 |
* untyped list type |
* untyped list type |
48 |
*/ |
*/ |
49 |
typedef struct alist_t* alist; |
typedef struct alist_t* alist; |
50 |
|
|
51 |
/** |
/** |
52 |
* list creation |
* list creation |
53 |
* @returns list |
* @returns list |
54 |
*/ |
*/ |
55 |
alist alist_create (); |
alist alist_create (); |
56 |
alist alist_clone (alist); |
alist alist_clone (alist); |
57 |
|
|
58 |
/** |
/** |
59 |
* funtion to use on data during list deletion. |
* funtion to use on data during list deletion. |
60 |
*/ |
*/ |
61 |
void alist_set_delete (alist,void (*f)(void*)); |
void alist_set_delete (alist,void (*f)(void*)); |
62 |
|
|
63 |
/** |
/** |
64 |
* delete a complete list. |
* delete a complete list. |
65 |
*/ |
*/ |
66 |
void alist_delete (alist); |
void alist_delete (alist); |
67 |
|
|
68 |
/** |
/** |
69 |
* add a element to the list |
* add a element to the list |
70 |
*/ |
*/ |
71 |
void alist_add (alist, void*); |
void alist_add (alist, void*); |
94 |
|
|
95 |
#if defined(__cplusplus) |
#if defined(__cplusplus) |
96 |
} |
} |
97 |
#endif |
#endif |
98 |
#endif /* _ALIST_H_ */ |
#endif /* _ALIST_H_ */ |