gwenhywfar
4.3.3
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
base
stringlist.h
Go to the documentation of this file.
1
/***************************************************************************
2
$RCSfile$
3
-------------------
4
cvs : $Id$
5
begin : Thu Apr 03 2003
6
copyright : (C) 2003 by Martin Preuss
7
email : martin@libchipcard.de
8
9
***************************************************************************
10
* *
11
* This library is free software; you can redistribute it and/or *
12
* modify it under the terms of the GNU Lesser General Public *
13
* License as published by the Free Software Foundation; either *
14
* version 2.1 of the License, or (at your option) any later version. *
15
* *
16
* This library is distributed in the hope that it will be useful, *
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19
* Lesser General Public License for more details. *
20
* *
21
* You should have received a copy of the GNU Lesser General Public *
22
* License along with this library; if not, write to the Free Software *
23
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
24
* MA 02111-1307 USA *
25
* *
26
***************************************************************************/
27
28
#ifndef GWENHYWFAR_STRINGLIST_H
29
#define GWENHYWFAR_STRINGLIST_H
30
31
#include <gwenhywfar/gwenhywfarapi.h>
32
33
34
#ifdef __cplusplus
35
extern
"C"
{
36
#endif
37
38
39
typedef
enum
{
41
GWEN_StringList_SortModeNoCase
=0,
43
GWEN_StringList_SortModeCase
,
46
GWEN_StringList_SortModeInt
47
}
GWEN_STRINGLIST_SORT_MODE
;
48
49
50
typedef
struct
GWEN_STRINGLISTENTRYSTRUCT
GWEN_STRINGLISTENTRY
;
51
52
53
typedef
struct
GWEN_STRINGLISTSTRUCT
GWEN_STRINGLIST
;
54
55
56
GWENHYWFAR_API
GWEN_STRINGLIST
*
GWEN_StringList_new
(
void
);
57
58
GWENHYWFAR_API
GWEN_STRINGLIST
*
GWEN_StringList_fromTabString
(
const
char
*s,
int
checkDup);
59
60
GWENHYWFAR_API
void
GWEN_StringList_free
(
GWEN_STRINGLIST
*sl);
61
GWENHYWFAR_API
62
GWEN_STRINGLIST
*
GWEN_StringList_dup
(
const
GWEN_STRINGLIST
*sl);
63
GWENHYWFAR_API
void
GWEN_StringList_Clear
(
GWEN_STRINGLIST
*sl);
64
66
GWENHYWFAR_API
67
unsigned
int
GWEN_StringList_Count
(
const
GWEN_STRINGLIST
*sl);
68
69
GWENHYWFAR_API
GWEN_STRINGLISTENTRY
*
GWEN_StringListEntry_new
(
const
char
*s,
70
int
take);
71
GWENHYWFAR_API
void
GWEN_StringListEntry_ReplaceString
(
GWEN_STRINGLISTENTRY
*e,
72
const
char
*s,
73
int
take);
74
GWENHYWFAR_API
void
GWEN_StringListEntry_free
(
GWEN_STRINGLISTENTRY
*sl);
75
GWENHYWFAR_API
void
GWEN_StringList_AppendEntry
(
GWEN_STRINGLIST
*sl,
76
GWEN_STRINGLISTENTRY
*se);
77
GWENHYWFAR_API
void
GWEN_StringList_RemoveEntry
(
GWEN_STRINGLIST
*sl,
78
GWEN_STRINGLISTENTRY
*se);
79
GWENHYWFAR_API
80
GWEN_STRINGLISTENTRY
*
GWEN_StringList_FirstEntry
(
const
GWEN_STRINGLIST
*sl);
81
GWENHYWFAR_API
82
GWEN_STRINGLISTENTRY
*
GWEN_StringListEntry_Next
(
const
GWEN_STRINGLISTENTRY
*se);
83
84
GWENHYWFAR_API
85
const
char
*
GWEN_StringListEntry_Data
(
const
GWEN_STRINGLISTENTRY
*se);
86
87
GWENHYWFAR_API
88
void
GWEN_StringListEntry_SetData
(
GWEN_STRINGLISTENTRY
*se,
89
const
char
*s);
90
97
GWENHYWFAR_API
98
void
GWEN_StringList_SetSenseCase
(
GWEN_STRINGLIST
*sl,
int
i);
99
107
GWENHYWFAR_API
108
void
GWEN_StringList_SetIgnoreRefCount
(
GWEN_STRINGLIST
*sl,
int
i);
109
117
GWENHYWFAR_API
int
GWEN_StringList_AppendString
(
GWEN_STRINGLIST
*sl,
118
const
char
*s,
119
int
take,
120
int
checkDouble);
121
129
GWENHYWFAR_API
int
GWEN_StringList_InsertString
(
GWEN_STRINGLIST
*sl,
130
const
char
*s,
131
int
take,
132
int
checkDouble);
133
138
GWENHYWFAR_API
int
GWEN_StringList_RemoveString
(
GWEN_STRINGLIST
*sl,
139
const
char
*s);
140
146
GWENHYWFAR_API
int
GWEN_StringList_HasString
(
const
GWEN_STRINGLIST
*sl,
147
const
char
*s);
148
154
GWENHYWFAR_API
int
GWEN_StringList_GetStringPos
(
const
GWEN_STRINGLIST
*sl,
const
char
*s);
155
156
168
GWENHYWFAR_API
169
void
*
GWEN_StringList_ForEach
(
const
GWEN_STRINGLIST
*l,
170
void
*(*func)(
const
char
*s,
void
*u),
171
void
*user_data);
172
174
GWENHYWFAR_API
175
const
char
*
GWEN_StringList_FirstString
(
const
GWEN_STRINGLIST
*l);
176
177
GWENHYWFAR_API
178
const
char
*
GWEN_StringList_StringAt
(
const
GWEN_STRINGLIST
*l,
int
idx);
179
180
192
GWENHYWFAR_API
193
void
GWEN_StringList_Sort
(
GWEN_STRINGLIST
*l,
194
int
ascending,
195
GWEN_STRINGLIST_SORT_MODE
sortMode);
196
197
GWENHYWFAR_API
198
GWEN_STRINGLIST
*
GWEN_StringList_fromString
(
const
char
*str,
const
char
*delimiters,
int
checkDouble);
199
200
#ifdef __cplusplus
201
}
202
#endif
203
204
#endif
205
206
Generated on Thu Mar 20 2014 17:06:00 for gwenhywfar by
1.8.1.2