- Part one of major RTL cleanup. Merge duplicated code and stick everything in lib...
[reactos.git] / reactos / lib / rtl / generictable.c
1 /* COPYRIGHT: See COPYING in the top level directory
2 * PROJECT: ReactOS system libraries
3 * PURPOSE: Generic Table Implementation
4 * FILE: lib/rtl/genertictbl.c
5 * PROGRAMMERS:
6 */
7
8 /* INCLUDES *****************************************************************/
9
10 #include <rtl.h>
11
12 #define NDEBUG
13 #include <debug.h>
14
15 /* FUNCTIONS *****************************************************************/
16
17 /*
18 * @unimplemented
19 */
20 BOOLEAN
21 STDCALL
22 RtlDeleteElementGenericTable (
23 PRTL_GENERIC_TABLE Table,
24 PVOID Buffer
25 )
26 {
27 UNIMPLEMENTED;
28 return FALSE;
29 }
30
31 /*
32 * @unimplemented
33 */
34 BOOLEAN
35 STDCALL
36 RtlDeleteElementGenericTableAvl (
37 PRTL_AVL_TABLE Table,
38 PVOID Buffer
39 )
40 {
41 UNIMPLEMENTED;
42 return FALSE;
43 }
44
45 /*
46 * @unimplemented
47 */
48 PVOID
49 STDCALL
50 RtlEnumerateGenericTable (
51 PRTL_GENERIC_TABLE Table,
52 BOOLEAN Restart
53 )
54 {
55 UNIMPLEMENTED;
56 return 0;
57 }
58
59 /*
60 * @unimplemented
61 */
62 PVOID
63 STDCALL
64 RtlEnumerateGenericTableAvl (
65 PRTL_AVL_TABLE Table,
66 BOOLEAN Restart
67 )
68 {
69 UNIMPLEMENTED;
70 return 0;
71 }
72
73 /*
74 * @unimplemented
75 */
76 PVOID
77 STDCALL
78 RtlEnumerateGenericTableLikeADirectory (
79 IN PRTL_AVL_TABLE Table,
80 IN PRTL_AVL_MATCH_FUNCTION MatchFunction,
81 IN PVOID MatchData,
82 IN ULONG NextFlag,
83 IN OUT PVOID *RestartKey,
84 IN OUT PULONG DeleteCount,
85 IN OUT PVOID Buffer
86 )
87 {
88 UNIMPLEMENTED;
89 return 0;
90 }
91
92 /*
93 * @unimplemented
94 */
95 PVOID
96 STDCALL
97 RtlEnumerateGenericTableWithoutSplaying (
98 PRTL_GENERIC_TABLE Table,
99 PVOID *RestartKey
100 )
101 {
102 UNIMPLEMENTED;
103 return 0;
104 }
105
106 /*
107 * @unimplemented
108 */
109 PVOID
110 STDCALL
111 RtlEnumerateGenericTableWithoutSplayingAvl (
112 PRTL_AVL_TABLE Table,
113 PVOID *RestartKey
114 )
115 {
116 UNIMPLEMENTED;
117 return 0;
118 }
119
120 /*
121 * @unimplemented
122 */
123 PVOID
124 STDCALL
125 RtlGetElementGenericTable(
126 PRTL_GENERIC_TABLE Table,
127 ULONG I
128 )
129 {
130 UNIMPLEMENTED;
131 return 0;
132 }
133
134 /*
135 * @unimplemented
136 */
137 PVOID
138 STDCALL
139 RtlGetElementGenericTableAvl (
140 PRTL_AVL_TABLE Table,
141 ULONG I
142 )
143 {
144 UNIMPLEMENTED;
145 return 0;
146 }
147
148 /*
149 * @unimplemented
150 */
151 VOID
152 STDCALL
153 RtlInitializeGenericTable (
154 PRTL_GENERIC_TABLE Table,
155 PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine,
156 PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine,
157 PRTL_GENERIC_FREE_ROUTINE FreeRoutine,
158 PVOID TableContext
159 )
160 {
161 UNIMPLEMENTED;
162 }
163
164
165 /*
166 * @implemented
167 */
168 VOID STDCALL
169 RtlInitializeGenericTableAvl(IN OUT PRTL_AVL_TABLE Table,
170 IN PRTL_AVL_COMPARE_ROUTINE CompareRoutine,
171 IN PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine,
172 IN PRTL_AVL_FREE_ROUTINE FreeRoutine,
173 IN PVOID TableContext)
174 {
175 RtlZeroMemory(Table,
176 sizeof(RTL_AVL_TABLE));
177 Table->BalancedRoot.Parent = &Table->BalancedRoot;
178
179 Table->CompareRoutine = CompareRoutine;
180 Table->AllocateRoutine = AllocateRoutine;
181 Table->FreeRoutine = FreeRoutine;
182 Table->TableContext = TableContext;
183 }
184
185
186 /*
187 * @unimplemented
188 */
189 PVOID
190 STDCALL
191 RtlInsertElementGenericTable (
192 PRTL_GENERIC_TABLE Table,
193 PVOID Buffer,
194 ULONG BufferSize,
195 PBOOLEAN NewElement OPTIONAL
196 )
197 {
198 UNIMPLEMENTED;
199 return 0;
200 }
201
202 /*
203 * @unimplemented
204 */
205 PVOID
206 STDCALL
207 RtlInsertElementGenericTableAvl (
208 PRTL_AVL_TABLE Table,
209 PVOID Buffer,
210 ULONG BufferSize,
211 PBOOLEAN NewElement OPTIONAL
212 )
213 {
214 UNIMPLEMENTED;
215 return 0;
216 }
217
218 /*
219 * @unimplemented
220 */
221 PVOID
222 STDCALL
223 RtlInsertElementGenericTableFull (
224 PRTL_GENERIC_TABLE Table,
225 PVOID Buffer,
226 ULONG BufferSize,
227 PBOOLEAN NewElement OPTIONAL,
228 PVOID NodeOrParent,
229 TABLE_SEARCH_RESULT SearchResult
230 )
231 {
232 UNIMPLEMENTED;
233 return 0;
234 }
235
236 /*
237 * @unimplemented
238 */
239 PVOID
240 STDCALL
241 RtlInsertElementGenericTableFullAvl (
242 PRTL_AVL_TABLE Table,
243 PVOID Buffer,
244 ULONG BufferSize,
245 PBOOLEAN NewElement OPTIONAL,
246 PVOID NodeOrParent,
247 TABLE_SEARCH_RESULT SearchResult
248 )
249 {
250 UNIMPLEMENTED;
251 return 0;
252 }
253
254
255 /*
256 * @unimplemented
257 */
258 BOOLEAN
259 STDCALL
260 RtlIsGenericTableEmpty (
261 PRTL_GENERIC_TABLE Table
262 )
263 {
264 UNIMPLEMENTED;
265 return FALSE;
266 }
267
268 /*
269 * @unimplemented
270 */
271 BOOLEAN
272 STDCALL
273 RtlIsGenericTableEmptyAvl (
274 PRTL_AVL_TABLE Table
275 )
276 {
277 UNIMPLEMENTED;
278 return FALSE;
279 }
280
281
282 /*
283 * @unimplemented
284 */
285 PVOID
286 STDCALL
287 RtlLookupElementGenericTable (
288 PRTL_GENERIC_TABLE Table,
289 PVOID Buffer
290 )
291 {
292 UNIMPLEMENTED;
293 return 0;
294 }
295
296 /*
297 * @unimplemented
298 */
299 PVOID
300 STDCALL
301 RtlLookupElementGenericTableAvl (
302 PRTL_AVL_TABLE Table,
303 PVOID Buffer
304 )
305 {
306 UNIMPLEMENTED;
307 return 0;
308 }
309
310 /*
311 * @unimplemented
312 */
313 PVOID
314 STDCALL
315 RtlLookupElementGenericTableFull (
316 PRTL_GENERIC_TABLE Table,
317 PVOID Buffer,
318 OUT PVOID *NodeOrParent,
319 OUT TABLE_SEARCH_RESULT *SearchResult
320 )
321 {
322 UNIMPLEMENTED;
323 return 0;
324 }
325
326 /*
327 * @unimplemented
328 */
329 PVOID
330 STDCALL
331 RtlLookupElementGenericTableFullAvl (
332 PRTL_AVL_TABLE Table,
333 PVOID Buffer,
334 OUT PVOID *NodeOrParent,
335 OUT TABLE_SEARCH_RESULT *SearchResult
336 )
337 {
338 UNIMPLEMENTED;
339 return 0;
340 }
341
342
343 /*
344 * @implemented
345 */
346 ULONG STDCALL
347 RtlNumberGenericTableElements(IN PRTL_GENERIC_TABLE Table)
348 {
349 return Table->NumberGenericTableElements;
350 }
351
352
353 /*
354 * @implemented
355 */
356 ULONG STDCALL
357 RtlNumberGenericTableElementsAvl(IN PRTL_AVL_TABLE Table)
358 {
359 return Table->NumberGenericTableElements;
360 }
361
362 /* EOF */