00001 /**************************************************************** 00002 * Fulguro 00003 * Copyright (C) 2004 Christophe Clienti 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the 00017 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 * Boston, MA 02111-1307, USA. 00019 ***************************************************************/ 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 00026 #ifndef __FLGR_DATA_TOOLS_LIST_H 00027 #define __FLGR_DATA_TOOLS_LIST_H 00028 00029 #include <flgrCoreDll.h> 00030 00031 typedef struct TLink TLink; 00032 00033 struct TLink { 00034 void *elt; 00035 TLink *next; 00036 TLink *previous; 00037 }; 00038 00042 typedef struct { 00044 TLink *start,*end; 00046 int nbelt; 00048 int field; 00049 } FLGR_List; 00050 00051 00052 EXPORT_LIB int flgr_list_is_empty(FLGR_List *l); 00053 EXPORT_LIB int flgr_list_size(FLGR_List *l); 00054 EXPORT_LIB FLGR_List *flgr_list_create(); 00055 00056 EXPORT_LIB void flgr_list_add_Head(FLGR_List *l,void *elt); 00057 EXPORT_LIB void flgr_list_add_tail(FLGR_List *l,void *elt); 00058 00059 EXPORT_LIB void flgr_list_del_head(FLGR_List *l); 00060 EXPORT_LIB void flgr_list_del_tail(FLGR_List *l); 00061 EXPORT_LIB void flgr_list_destroy(FLGR_List *l); 00062 00063 EXPORT_LIB void *flgr_list_get_head(FLGR_List *l); 00064 EXPORT_LIB void *flgr_list_get_tail(FLGR_List *l); 00065 00066 EXPORT_LIB void flgr_list_stack_push(FLGR_List *l,void *elt); 00067 EXPORT_LIB void *flgr_list_stack_pop(FLGR_List *l); 00068 EXPORT_LIB void flgr_list_queue_add(FLGR_List *l,void *elt); 00069 EXPORT_LIB void *flgr_list_queue_get(FLGR_List *l); 00070 00071 00072 00073 00074 #endif 00075 00076 #ifdef __cplusplus 00077 } 00078 #endif