ReactOS 0.4.15-dev-8235-gcd88a97
hash.h
Go to the documentation of this file.
1/*
2 * Summary: Chained hash tables
3 * Description: This module implements the hash table support used in
4 * various places in the library.
5 *
6 * Copy: See Copyright for the status of this software.
7 *
8 * Author: Bjorn Reese <bjorn.reese@systematic.dk>
9 */
10
11#ifndef __XML_HASH_H__
12#define __XML_HASH_H__
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/*
19 * The hash table.
20 */
23
24#ifdef __cplusplus
25}
26#endif
27
28#include <libxml/xmlversion.h>
29#include <libxml/parser.h>
30#include <libxml/dict.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/*
37 * Recent version of gcc produce a warning when a function pointer is assigned
38 * to an object pointer, or vice versa. The following macro is a dirty hack
39 * to allow suppression of the warning. If your architecture has function
40 * pointers which are a different size than a void pointer, there may be some
41 * serious trouble within the library.
42 */
56#define XML_CAST_FPTR(fptr) fptr
57
58
59/*
60 * function types:
61 */
69typedef void (*xmlHashDeallocator)(void *payload, const xmlChar *name);
79typedef void *(*xmlHashCopier)(void *payload, const xmlChar *name);
88typedef void (*xmlHashScanner)(void *payload, void *data, const xmlChar *name);
99typedef void (*xmlHashScannerFull)(void *payload, void *data,
100 const xmlChar *name, const xmlChar *name2,
101 const xmlChar *name3);
102
103/*
104 * Constructor and destructor.
105 */
107 xmlHashCreate (int size);
116 const xmlChar *name);
117
118/*
119 * Add a new entry to the hash table.
120 */
123 const xmlChar *name,
124 void *userdata);
127 const xmlChar *name,
128 void *userdata,
132 const xmlChar *name,
133 const xmlChar *name2,
134 void *userdata);
137 const xmlChar *name,
138 const xmlChar *name2,
139 void *userdata,
143 const xmlChar *name,
144 const xmlChar *name2,
145 const xmlChar *name3,
146 void *userdata);
149 const xmlChar *name,
150 const xmlChar *name2,
151 const xmlChar *name3,
152 void *userdata,
154
155/*
156 * Remove an entry from the hash table.
157 */
166 const xmlChar *name2, const xmlChar *name3,
168
169/*
170 * Retrieve the userdata.
171 */
172XMLPUBFUN void * XMLCALL
174 const xmlChar *name);
175XMLPUBFUN void * XMLCALL
177 const xmlChar *name,
178 const xmlChar *name2);
179XMLPUBFUN void * XMLCALL
181 const xmlChar *name,
182 const xmlChar *name2,
183 const xmlChar *name3);
184XMLPUBFUN void * XMLCALL
186 const xmlChar *name,
187 const xmlChar *prefix);
188XMLPUBFUN void * XMLCALL
190 const xmlChar *name,
191 const xmlChar *prefix,
192 const xmlChar *name2,
193 const xmlChar *prefix2);
194XMLPUBFUN void * XMLCALL
196 const xmlChar *name,
197 const xmlChar *prefix,
198 const xmlChar *name2,
199 const xmlChar *prefix2,
200 const xmlChar *name3,
201 const xmlChar *prefix3);
202
203/*
204 * Helpers.
205 */
214 void *data);
217 const xmlChar *name,
218 const xmlChar *name2,
219 const xmlChar *name3,
221 void *data);
225 void *data);
228 const xmlChar *name,
229 const xmlChar *name2,
230 const xmlChar *name3,
232 void *data);
233#ifdef __cplusplus
234}
235#endif
236#endif /* ! __XML_HASH_H__ */
static const WCHAR name3[]
Definition: db.c:2879
#define XMLCALL
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLfloat f
Definition: glext.h:7540
uint32_t entry
Definition: isohybrid.c:63
static WCHAR name2[]
Definition: record.c:35
XMLPUBFUN void XMLCALL xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScannerFull f, void *data)
Definition: hash.c:950
XMLPUBFUN int XMLCALL xmlHashUpdateEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata, xmlHashDeallocator f)
Definition: hash.c:445
XMLPUBFUN int XMLCALL xmlHashAddEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata)
Definition: hash.c:406
XMLPUBFUN void XMLCALL xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f)
Definition: hash.c:322
XMLPUBFUN int XMLCALL xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashDeallocator f)
Definition: hash.c:1091
xmlHashTable * xmlHashTablePtr
Definition: hash.h:22
void(* xmlHashDeallocator)(void *payload, const xmlChar *name)
Definition: hash.h:69
XMLPUBFUN void *XMLCALL xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3)
Definition: hash.c:769
XMLPUBFUN void *XMLCALL xmlHashLookup(xmlHashTablePtr table, const xmlChar *name)
Definition: hash.c:461
void *(* xmlHashCopier)(void *payload, const xmlChar *name)
Definition: hash.h:79
XMLPUBFUN int XMLCALL xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata, xmlHashDeallocator f)
Definition: hash.c:647
void(* xmlHashScanner)(void *payload, void *data, const xmlChar *name)
Definition: hash.h:88
XMLPUBFUN int XMLCALL xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, xmlHashDeallocator f)
Definition: hash.c:1071
XMLPUBFUN void *XMLCALL xmlHashQLookup(xmlHashTablePtr table, const xmlChar *name, const xmlChar *prefix)
Definition: hash.c:492
XMLPUBFUN void *XMLCALL xmlHashQLookup3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *prefix, const xmlChar *name2, const xmlChar *prefix2, const xmlChar *name3, const xmlChar *prefix3)
Definition: hash.c:813
XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCreate(int size)
Definition: hash.c:176
XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCreateDict(int size, xmlDictPtr dict)
Definition: hash.c:210
XMLPUBFUN void XMLCALL xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data)
Definition: hash.c:875
XMLPUBFUN int XMLCALL xmlHashSize(xmlHashTablePtr table)
Definition: hash.c:1034
XMLPUBFUN void *XMLCALL xmlHashQLookup2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *prefix, const xmlChar *name2, const xmlChar *prefix2)
Definition: hash.c:510
XMLPUBFUN int XMLCALL xmlHashAddEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata)
Definition: hash.c:389
XMLPUBFUN int XMLCALL xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, xmlHashDeallocator f)
Definition: hash.c:1052
XMLPUBFUN void *XMLCALL xmlHashLookup2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2)
Definition: hash.c:476
XMLPUBFUN void XMLCALL xmlHashScan3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScanner f, void *data)
Definition: hash.c:926
XMLPUBFUN void XMLCALL xmlHashDefaultDeallocator(void *entry, const xmlChar *name)
XMLPUBFUN int XMLCALL xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata)
Definition: hash.c:531
XMLPUBFUN void XMLCALL xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data)
Definition: hash.c:859
XMLPUBFUN int XMLCALL xmlHashUpdateEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata, xmlHashDeallocator f)
Definition: hash.c:425
void(* xmlHashScannerFull)(void *payload, void *data, const xmlChar *name, const xmlChar *name2, const xmlChar *name3)
Definition: hash.h:99
XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCopy(xmlHashTablePtr table, xmlHashCopier f)
Definition: hash.c:992
Definition: dict.c:111
xmlDictPtr dict
Definition: hash.c:67
Definition: name.c:39
#define XMLPUBFUN
Definition: xmlexports.h:61
unsigned char xmlChar
Definition: xmlstring.h:28