source: trunk/kStuff/include/k/kAvlU32.h@ 3559

Last change on this file since 3559 was 3555, checked in by bird, 18 years ago

Merging in kAvl enhancements, doing some config simplications and made them inlineable.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1/* $Id: kAvlU32.h 3555 2007-08-26 10:43:27Z bird $ */
2/** @file
3 * kAVL - AVL Tree Implementation, KU32 keys.
4 */
5
6/*
7 * Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
8 *
9 * This file is part of kStuff.
10 *
11 * kStuff 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 * kStuff 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 kStuff; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 *
25 */
26
27#ifndef ___k_kAvlU32_h___
28#define ___k_kAvlU32_h___
29
30typedef struct KAVLU32
31{
32 KU32 Key;
33 KU8 uchHeight;
34 struct KAVLU32 *pLeft;
35 struct KAVLU32 *pRight;
36} KAVLU32, *PKAVLU32, **PPKAVLU32;
37
38typedef struct
39{
40 KBOOL fFromLeft;
41 KI8 cEntries;
42 KU8 achFlags[32];
43 PKAVLU32 aEntries[32];
44} KAVLU32ENUMDATA, *PKAVLU32ENUMDATA;
45
46typedef int (* PFNKAVLU32CALLBACK)(KAVLU32 *, void *);
47
48/*#define KAVL_EQUAL_ALLOWED*/
49#define KAVL_CHECK_FOR_EQUAL_INSERT
50#define KAVL_MAX_STACK 32
51/*#define KAVL_RANGE */
52/*#define KAVL_OFFSET */
53#define KAVL_STD_KEY_COMP
54#define KAVLKEY KU32
55#define KAVLNODECORE KAVLU32
56#define KAVL_FN(name) kAvlU32 ## name
57#define KAVL_TYPE(prefix,name) prefix ## KAVLU32 ## name
58#define KAVL_INT(name) KAVLU32INT ## name
59#define KAVL_DECL(rettype) K_DECL_INLINE(rettype)
60
61#include <k/kAvlTmpl/kAvlBase.h>
62#include <k/kAvlTmpl/kAVLDoWithAll.h>
63#include <k/kAvlTmpl/kAVLEnum.h>
64#include <k/kAvlTmpl/kAvlGet.h>
65#include <k/kAvlTmpl/kAvlGetBestFit.h>
66#include <k/kAvlTmpl/kAvlGetWithParent.h>
67#include <k/kAvlTmpl/kAvlRemove2.h>
68#include <k/kAvlTmpl/kAvlRemoveBestFit.h>
69#include <k/kAvlTmpl/kAvlUndef.h>
70
71#endif
72
Note: See TracBrowser for help on using the repository browser.