• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1      * Summary: Chained hash tables
2      * Description: This module implements the hash table support used in
3      *              various places in the library.
4      *
5      * Copy: See Copyright for the status of this software.
6      *
7      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
8
9      /if not defined(XML_HASH_H__)
10      /define XML_HASH_H__
11
12      /include "libxmlrpg/xmlTypesC"
13
14      * The hash table.
15
16     d xmlHashTablePtr...
17     d                 s               *   based(######typedef######)
18
19      /include "libxmlrpg/xmlversion"
20      /include "libxmlrpg/parser"
21      /include "libxmlrpg/dict"
22
23      * function types:
24
25      * xmlHashDeallocator:
26      * @payload:  the data in the hash
27      * @name:  the name associated
28      *
29      * Callback to free data from a hash.
30
31     d xmlHashDeallocator...
32     d                 s               *   based(######typedef######)
33     d                                     procptr
34
35      * xmlHashCopier:
36      * @payload:  the data in the hash
37      * @name:  the name associated
38      *
39      * Callback to copy data from a hash.
40      *
41      * Returns a copy of the data or NULL in case of error.
42
43     d xmlHashCopier   s               *   based(######typedef######)
44     d                                     procptr
45
46      * xmlHashScanner:
47      * @payload:  the data in the hash
48      * @data:  extra scannner data
49      * @name:  the name associated
50      *
51      * Callback when scanning data in a hash with the simple scanner.
52
53     d xmlHashScanner  s               *   based(######typedef######)
54     d                                     procptr
55
56      * xmlHashScannerFull:
57      * @payload:  the data in the hash
58      * @data:  extra scannner data
59      * @name:  the name associated
60      * @name2:  the second name associated
61      * @name3:  the third name associated
62      *
63      * Callback when scanning data in a hash with the full scanner.
64
65     d xmlHashScannerFull...
66     d                 s               *   based(######typedef######)
67     d                                     procptr
68
69      * Constructor and destructor.
70
71     d xmlHashCreate   pr                  extproc('xmlHashCreate')
72     d                                     like(xmlHashTablePtr)
73     d  size                               value like(xmlCint)
74
75     d xmlHashCreateDict...
76     d                 pr                  extproc('xmlHashCreateDict')
77     d                                     like(xmlHashTablePtr)
78     d  size                               value like(xmlCint)
79     d  dict                               value like(xmlDictPtr)
80
81     d xmlHashFree     pr                  extproc('xmlHashFree')
82     d  table                              value like(xmlHashTablePtr)
83     d  f                                  value like(xmlHashDeallocator)
84
85      * Add a new entry to the hash table.
86
87     d xmlHashAddEntry...
88     d                 pr                  extproc('xmlHashAddEntry')
89     d                                     like(xmlCint)
90     d  table                              value like(xmlHashTablePtr)
91     d  name                           *   value options(*string)               const xmlChar *
92     d  userdata                       *   value options(*string)               void *
93
94     d xmlHashUpdateEntry...
95     d                 pr                  extproc('xmlHashUpdateEntry')
96     d                                     like(xmlCint)
97     d  table                              value like(xmlHashTablePtr)
98     d  name                           *   value options(*string)               const xmlChar *
99     d  userdata                       *   value options(*string)               void *
100     d  f                                  value like(xmlHashDeallocator)
101
102     d xmlHashAddEntry2...
103     d                 pr                  extproc('xmlHashAddEntry2')
104     d                                     like(xmlCint)
105     d  table                              value like(xmlHashTablePtr)
106     d  name                           *   value options(*string)               const xmlChar *
107     d  name2                          *   value options(*string)               const xmlChar *
108     d  userdata                       *   value options(*string)               void *
109
110     d xmlHashUpdateEntry2...
111     d                 pr                  extproc('xmlHashUpdateEntry2')
112     d                                     like(xmlCint)
113     d  table                              value like(xmlHashTablePtr)
114     d  name                           *   value options(*string)               const xmlChar *
115     d  name2                          *   value options(*string)               const xmlChar *
116     d  userdata                       *   value options(*string)               void *
117     d  f                                  value like(xmlHashDeallocator)
118
119     d xmlHashAddEntry3...
120     d                 pr                  extproc('xmlHashAddEntry3')
121     d                                     like(xmlCint)
122     d  table                              value like(xmlHashTablePtr)
123     d  name                           *   value options(*string)               const xmlChar *
124     d  name2                          *   value options(*string)               const xmlChar *
125     d  name3                          *   value options(*string)               const xmlChar *
126     d  userdata                       *   value options(*string)               void *
127
128     d xmlHashUpdateEntry3...
129     d                 pr                  extproc('xmlHashUpdateEntry3')
130     d                                     like(xmlCint)
131     d  table                              value like(xmlHashTablePtr)
132     d  name                           *   value options(*string)               const xmlChar *
133     d  name2                          *   value options(*string)               const xmlChar *
134     d  name3                          *   value options(*string)               const xmlChar *
135     d  userdata                       *   value options(*string)               void *
136     d  f                                  value like(xmlHashDeallocator)
137
138      * Remove an entry from the hash table.
139
140     d xmlHashRemoveEntry...
141     d                 pr                  extproc('xmlHashRemoveEntry')
142     d                                     like(xmlCint)
143     d  table                              value like(xmlHashTablePtr)
144     d  name                           *   value options(*string)               const xmlChar *
145     d  f                                  value like(xmlHashDeallocator)
146
147     d xmlHashRemoveEntry2...
148     d                 pr                  extproc('xmlHashRemoveEntry2')
149     d                                     like(xmlCint)
150     d  table                              value like(xmlHashTablePtr)
151     d  name                           *   value options(*string)               const xmlChar *
152     d  name2                          *   value options(*string)               const xmlChar *
153     d  f                                  value like(xmlHashDeallocator)
154
155     d xmlHashRemoveEntry3...
156     d                 pr                  extproc('xmlHashRemoveEntry3')
157     d                                     like(xmlCint)
158     d  table                              value like(xmlHashTablePtr)
159     d  name                           *   value options(*string)               const xmlChar *
160     d  name2                          *   value options(*string)               const xmlChar *
161     d  name3                          *   value options(*string)               const xmlChar *
162     d  f                                  value like(xmlHashDeallocator)
163
164      * Retrieve the userdata.
165
166     d xmlHashLookup   pr              *   extproc('xmlHashLookup')             void *
167     d  table                              value like(xmlHashTablePtr)
168     d  name                           *   value options(*string)               const xmlChar *
169
170     d xmlHashLookup2  pr              *   extproc('xmlHashLookup2')            void *
171     d  table                              value like(xmlHashTablePtr)
172     d  name                           *   value options(*string)               const xmlChar *
173     d  name2                          *   value options(*string)               const xmlChar *
174
175     d xmlHashLookup3  pr              *   extproc('xmlHashLookup3')            void *
176     d  table                              value like(xmlHashTablePtr)
177     d  name                           *   value options(*string)               const xmlChar *
178     d  name2                          *   value options(*string)               const xmlChar *
179     d  name3                          *   value options(*string)               const xmlChar *
180
181     d xmlHashQLookup  pr              *   extproc('xmlHashQLookup')            void *
182     d  table                              value like(xmlHashTablePtr)
183     d  name                           *   value options(*string)               const xmlChar *
184     d  prefix                         *   value options(*string)               const xmlChar *
185
186     d xmlHashQLookup2...
187     d                 pr              *   extproc('xmlHashQLookup2')           void *
188     d  table                              value like(xmlHashTablePtr)
189     d  name                           *   value options(*string)               const xmlChar *
190     d  prefix                         *   value options(*string)               const xmlChar *
191     d  name2                          *   value options(*string)               const xmlChar *
192     d  prefix2                        *   value options(*string)               const xmlChar *
193
194     d xmlHashQLookup3...
195     d                 pr              *   extproc('xmlHashQLookup3')           void *
196     d  table                              value like(xmlHashTablePtr)
197     d  name                           *   value options(*string)               const xmlChar *
198     d  prefix                         *   value options(*string)               const xmlChar *
199     d  name2                          *   value options(*string)               const xmlChar *
200     d  prefix2                        *   value options(*string)               const xmlChar *
201     d  name3                          *   value options(*string)               const xmlChar *
202     d  prefix3                        *   value options(*string)               const xmlChar *
203
204      * Helpers.
205
206     d xmlHashCopy     pr                  extproc('xmlHashCopy')
207     d                                     like(xmlHashTablePtr)
208     d  table                              value like(xmlHashTablePtr)
209     d  f                                  value like(xmlHashCopier)
210
211     d xmlHashSize     pr                  extproc('xmlHashSize')
212     d                                     like(xmlCint)
213     d  table                              value like(xmlHashTablePtr)
214
215     d xmlHashScan     pr                  extproc('xmlHashScan')
216     d  table                              value like(xmlHashTablePtr)
217     d  f                                  value like(xmlHashScanner)
218     d  data                           *   value options(*string)               void *
219
220     d xmlHashScan3    pr                  extproc('xmlHashScan3')
221     d  table                              value like(xmlHashTablePtr)
222     d  name                           *   value options(*string)               const xmlChar *
223     d  name2                          *   value options(*string)               const xmlChar *
224     d  name3                          *   value options(*string)               const xmlChar *
225     d  f                                  value like(xmlHashScanner)
226     d  data                           *   value options(*string)               void *
227
228     d xmlHashScanFull...
229     d                 pr                  extproc('xmlHashScanFull')
230     d  table                              value like(xmlHashTablePtr)
231     d  f                                  value like(xmlHashScannerFull)
232     d  data                           *   value options(*string)               void *
233
234     d xmlHashScanFull3...
235     d                 pr                  extproc('xmlHashScanFull3')
236     d  table                              value like(xmlHashTablePtr)
237     d  name                           *   value options(*string)               const xmlChar *
238     d  name2                          *   value options(*string)               const xmlChar *
239     d  name3                          *   value options(*string)               const xmlChar *
240     d  f                                  value like(xmlHashScannerFull)
241     d  data                           *   value options(*string)               void *
242
243      /endif                                                                    XML_HASH_H__
244