_gdsl_list.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the Generic Data Structures Library (GDSL).
00003  * Copyright (C) 1998-2006 Nicolas Darnis <ndarnis@free.fr>.
00004  *
00005  * The GDSL library is free software; you can redistribute it and/or 
00006  * modify it under the terms of the GNU General Public License as 
00007  * published by the Free Software Foundation; either version 2 of
00008  * the License, or (at your option) any later version.
00009  *
00010  * The GDSL 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
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with the GDSL library; see the file COPYING.
00017  * If not, write to the Free Software Foundation, Inc., 
00018  * 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
00019  *
00020  * $RCSfile: __gdsl__list_8h-source.html,v $
00021  * $Revision: 1.10 $
00022  * $Date: 2006/06/22 09:16:01 $
00023  */
00024 
00025 
00026 #ifndef __GDSL_LIST_H_
00027 #define __GDSL_LIST_H_
00028 
00029 
00030 #include <stdio.h>
00031 
00032 
00033 #include "_gdsl_node.h"
00034 #include "gdsl_types.h"
00035 
00036 
00037 #ifdef __cplusplus
00038 extern "C" 
00039 {
00040 #endif /* __cplusplus */
00041 
00042 
00054 typedef _gdsl_node_t _gdsl_list_t;
00055 
00056 /******************************************************************************/
00057 /* Management functions of low-level doubly-linked lists                      */
00058 /******************************************************************************/
00059 
00073 extern _gdsl_list_t
00074 _gdsl_list_alloc (const gdsl_element_t E
00075           );
00076 
00090 extern void 
00091 _gdsl_list_free (_gdsl_list_t L,
00092          const gdsl_free_func_t FREE_F
00093          );
00094 
00095 /******************************************************************************/
00096 /* Consultation functions of low-level doubly-linked lists                    */
00097 /******************************************************************************/
00098 
00108 extern bool
00109 _gdsl_list_is_empty (const _gdsl_list_t L
00110              );
00111 
00119 extern ulong
00120 _gdsl_list_get_size (const _gdsl_list_t L
00121              );
00122 
00123 /******************************************************************************/
00124 /* Modification functions of low-level doubly-linked lists                    */
00125 /******************************************************************************/
00126 
00138 extern void
00139 _gdsl_list_link (_gdsl_list_t L1,
00140          _gdsl_list_t L2
00141          );
00142 
00155 extern void 
00156 _gdsl_list_insert_after (_gdsl_list_t L,
00157              _gdsl_list_t PREV
00158              );
00159 
00172 extern void
00173 _gdsl_list_insert_before (_gdsl_list_t L,
00174               _gdsl_list_t SUCC
00175               );
00176 
00189 extern void
00190 _gdsl_list_remove (_gdsl_node_t NODE
00191            );
00192 
00193 /******************************************************************************/
00194 /* Search functions of low-level doubly-linked lists                          */
00195 /******************************************************************************/
00196  
00212 extern _gdsl_list_t
00213 _gdsl_list_search (_gdsl_list_t L,
00214            const gdsl_compare_func_t COMP_F,
00215            void* VALUE
00216            );
00217 
00218 /******************************************************************************/
00219 /* Parse functions of low-level doubly-linked lists                           */
00220 /******************************************************************************/
00221 
00239 extern _gdsl_list_t
00240 _gdsl_list_map_forward (const _gdsl_list_t L,
00241             const _gdsl_node_map_func_t MAP_F,
00242             void* USER_DATA
00243             );
00244         
00262 extern _gdsl_list_t
00263 _gdsl_list_map_backward (const _gdsl_list_t L,
00264              const _gdsl_node_map_func_t MAP_F,
00265              void* USER_DATA
00266              );
00267 
00268 /******************************************************************************/
00269 /* Input/output functions of low-level doubly-linked lists                    */
00270 /******************************************************************************/
00271 
00288 extern void
00289 _gdsl_list_write (const _gdsl_list_t L,
00290           const _gdsl_node_write_func_t WRITE_F,
00291           FILE* OUTPUT_FILE,
00292           void* USER_DATA
00293           );
00294 
00313 extern void
00314 _gdsl_list_write_xml (const _gdsl_list_t L,
00315               const _gdsl_node_write_func_t WRITE_F,
00316               FILE* OUTPUT_FILE,
00317               void* USER_DATA
00318               );
00319              
00337 extern void
00338 _gdsl_list_dump (const _gdsl_list_t L,
00339          const _gdsl_node_write_func_t WRITE_F,
00340          FILE* OUTPUT_FILE,
00341          void* USER_DATA
00342          );
00343 
00344 /*
00345  * @}
00346  */
00347 
00348 
00349 #ifdef __cplusplus
00350 }
00351 #endif /* __cplusplus */
00352 
00353 
00354 #endif /* __GDSL_LIST_H_ */
00355 
00356 

Generated on Thu Jun 22 11:15:30 2006 for gdsl by  doxygen 1.4.6