Main Page | Modules | File List | Globals

gdsl_types.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-2004 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__types_8h-source.html,v $
00021  * $Revision: 1.4 $
00022  * $Date: 2004/10/03 14:35:38 $
00023  */
00024 
00025 #ifndef _GDSL_TYPES_H_
00026 #define _GDSL_TYPES_H_
00027 
00028 
00029 #include <stdio.h>
00030 
00031 
00032 #ifdef __cplusplus
00033 extern "C" 
00034 {
00035 #endif /* __cplusplus */
00036 
00037 
00047 typedef enum
00048 {
00050     GDSL_ERR_MEM_ALLOC = -1,
00051 
00053     GDSL_MAP_STOP = 0,
00054 
00056     GDSL_MAP_CONT = 1,
00057 
00059     GDSL_INSERTED,
00060 
00062     GDSL_FOUND
00063 
00064 } gdsl_constant_t;
00065 
00072 typedef void* gdsl_element_t;
00073 
00085 typedef gdsl_element_t 
00086 (* gdsl_alloc_func_t) (void* USER_DATA
00087                );
00088 
00103 typedef void 
00104 (* gdsl_free_func_t) (gdsl_element_t E
00105               );
00106 
00116 typedef gdsl_element_t 
00117 (* gdsl_copy_func_t) (const gdsl_element_t E
00118               );
00119 
00132 typedef int 
00133 (* gdsl_map_func_t) (const gdsl_element_t E,
00134              void* USER_DATA
00135              );
00136 
00152 typedef int 
00153 (* gdsl_compare_func_t) (const gdsl_element_t E,
00154              void* VALUE
00155              );
00156 
00167 typedef void 
00168 (* gdsl_write_func_t) (const gdsl_element_t E,
00169                FILE* OUTPUT_FILE,
00170                void* USER_DATA
00171                );
00172   
00173 #ifdef _NO_LIBGDSL_TYPES_
00174 
00175 #else /* _NO_LIBGDSL_TYPES_ */
00176 
00177 #include <sys/types.h>
00178 
00179 #ifdef HAVE_LINUX
00180 
00181 typedef char          byte;
00182 typedef unsigned char ubyte;
00183 
00184 #else /* not HAVE_LINUX */
00185 
00186 #ifndef _SYS_TYPES_H
00187 typedef unsigned long int ulong;
00188 #endif /* _SYS_TYPES_H */
00189 
00190 #endif /* not HAVE_LINUX */
00191 
00192 #ifndef __cplusplus
00193 
00194 #ifdef TRUE
00195 #undef TRUE
00196 #endif
00197 
00198 #ifdef FALSE
00199 #undef FALSE
00200 #endif
00201 
00202 #ifdef bool
00203 #undef bool
00204 #endif /* not __cplusplus */
00205 
00210 typedef enum 
00211 {
00213   FALSE = 0,
00215   TRUE = 1 
00216 } bool;
00217 
00218 #endif /* not __cplusplus */
00219 
00220 #endif /* not _NO_LIBGDSL_TYPES_ */
00221 
00222 
00223 /*
00224  * @}
00225  */
00226 
00227 
00228 #ifdef __cplusplus
00229 }
00230 #endif /* __cplusplus */
00231 
00232 
00233 #endif /* _GDSL_TYPES_H_ */
00234 

Generated on Sun Oct 3 16:15:50 2004 for GDSL by doxygen 1.3.5