Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

stringlist.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: stringlist.h,v $
00003  -------------------
00004  cvs         : $Id: stringlist.h,v 1.14 2005/07/09 13:38:17 aquamaniac Exp $
00005  begin       : Thu Apr 03 2003
00006  copyright   : (C) 2003 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 #ifndef GWENHYWFAR_STRINGLIST_H
00029 #define GWENHYWFAR_STRINGLIST_H
00030 
00031 #include <gwenhywfar/gwenhywfarapi.h>
00032 
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 
00039 typedef enum {
00041   GWEN_StringList_SortModeNoCase=0,
00043   GWEN_StringList_SortModeCase,
00046   GWEN_StringList_SortModeInt
00047 } GWEN_STRINGLIST_SORT_MODE;
00048 
00049 
00050 typedef struct GWEN_STRINGLISTENTRYSTRUCT GWEN_STRINGLISTENTRY;
00051 
00052 
00053 typedef struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST;
00054 
00055 
00056 GWENHYWFAR_API GWEN_STRINGLIST *GWEN_StringList_new();
00057 GWENHYWFAR_API void GWEN_StringList_free(GWEN_STRINGLIST *sl);
00058 GWENHYWFAR_API
00059   GWEN_STRINGLIST *GWEN_StringList_dup(const GWEN_STRINGLIST *sl);
00060 GWENHYWFAR_API void GWEN_StringList_Clear(GWEN_STRINGLIST *sl);
00061 
00063 GWENHYWFAR_API
00064   unsigned int GWEN_StringList_Count(const GWEN_STRINGLIST *sl);
00065 
00066 GWENHYWFAR_API GWEN_STRINGLISTENTRY *GWEN_StringListEntry_new(const char *s,
00067                                                               int take);
00068 GWENHYWFAR_API void GWEN_StringListEntry_ReplaceString(GWEN_STRINGLISTENTRY *e,
00069                                                        const char *s,
00070                                                        int take);
00071 GWENHYWFAR_API void GWEN_StringListEntry_free(GWEN_STRINGLISTENTRY *sl);
00072 GWENHYWFAR_API void GWEN_StringList_AppendEntry(GWEN_STRINGLIST *sl,
00073                                                 GWEN_STRINGLISTENTRY *se);
00074 GWENHYWFAR_API void GWEN_StringList_RemoveEntry(GWEN_STRINGLIST *sl,
00075                                                 GWEN_STRINGLISTENTRY *se);
00076 GWENHYWFAR_API
00077   GWEN_STRINGLISTENTRY *GWEN_StringList_FirstEntry(const GWEN_STRINGLIST *sl);
00078 GWENHYWFAR_API
00079   GWEN_STRINGLISTENTRY *GWEN_StringListEntry_Next(const GWEN_STRINGLISTENTRY *se);
00080 
00081 GWENHYWFAR_API
00082   const char *GWEN_StringListEntry_Data(const GWEN_STRINGLISTENTRY *se);
00083 
00090 void GWEN_StringList_SetSenseCase(GWEN_STRINGLIST *sl, int i);
00091 
00099 void GWEN_StringList_SetIgnoreRefCount(GWEN_STRINGLIST *sl, int i);
00100 
00108 GWENHYWFAR_API int GWEN_StringList_AppendString(GWEN_STRINGLIST *sl,
00109                                                 const char *s,
00110                                                 int take,
00111                                                 int checkDouble);
00112 
00120 GWENHYWFAR_API int GWEN_StringList_InsertString(GWEN_STRINGLIST *sl,
00121                                                 const char *s,
00122                                                 int take,
00123                                                 int checkDouble);
00124 
00129 GWENHYWFAR_API int GWEN_StringList_RemoveString(GWEN_STRINGLIST *sl,
00130                                                 const char *s);
00131 
00137 GWENHYWFAR_API int GWEN_StringList_HasString(const GWEN_STRINGLIST *sl,
00138                                              const char *s);
00139 
00140 
00152 GWENHYWFAR_API
00153 void *GWEN_StringList_ForEach(const GWEN_STRINGLIST *l, 
00154                               void *(*func)(const char *s, void *u), 
00155                               void *user_data);
00156 
00158 GWENHYWFAR_API
00159 const char *GWEN_StringList_FirstString(const GWEN_STRINGLIST *l);
00160 
00161 
00173 GWENHYWFAR_API
00174 void GWEN_StringList_Sort(GWEN_STRINGLIST *l,
00175                           int ascending,
00176                           GWEN_STRINGLIST_SORT_MODE sortMode);
00177 
00178 #ifdef __cplusplus
00179 }
00180 #endif
00181 
00182 #endif
00183 
00184 

Generated on Wed Oct 5 15:12:37 2005 for gwenhywfar by  doxygen 1.4.4