source: trunk/kStuff/include/k/kAvlrU32.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: kAvlrU32.h 3555 2007-08-26 10:43:27Z bird $ */
2/** @file
3 * kAVL - AVL Tree Implementation, KU32 key ranges.
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_kAvlrU32_h___
28#define ___k_kAvlrU32_h___
29
30typedef struct KAVLRU32
31{
32 KU32 Key;
33 KU32 KeyLast;
34 struct KAVLRU32 *pLeft;
35 struct KAVLRU32 *pRight;
36 KU8 uchHeight;
37} KAVLRU32, *PKAVLRU32, **PPKAVLRU32;
38
39typedef struct
40{
41 KBOOL fFromLeft;
42 KI8 cEntries;
43 KU8 achFlags[32];
44 PKAVLRU32 aEntries[32];
45} KAVLRU32ENUMDATA, *PKAVLRU32ENUMDATA;
46
47typedef int (* PFNKAVLRU32CALLBACK)(KAVLRU32 *, void *);
48
49/*#define KAVL_EQUAL_ALLOWED*/
50#define KAVL_CHECK_FOR_EQUAL_INSERT
51#define KAVL_MAX_STACK 32
52#define KAVL_RANGE
53/*#define KAVL_OFFSET */
54#define KAVL_STD_KEY_COMP
55#define KAVLKEY KU32
56#define KAVLNODECORE KAVLRU32
57#define KAVL_FN(name) kAvlrU32 ## name
58#define KAVL_TYPE(prefix,name) prefix ## KAVLRU32 ## name
59#define KAVL_INT(name) KAVLRU32INT ## name
60#define KAVL_DECL(rettype) K_DECL_INLINE(rettype)
61
62#include <k/kAvlTmpl/kAvlBase.h>
63#include <k/kAvlTmpl/kAVLDoWithAll.h>
64#include <k/kAvlTmpl/kAVLEnum.h>
65#include <k/kAvlTmpl/kAvlGet.h>
66#include <k/kAvlTmpl/kAvlGetBestFit.h>
67#include <k/kAvlTmpl/kAvlGetWithParent.h>
68#include <k/kAvlTmpl/kAvlRemove2.h>
69#include <k/kAvlTmpl/kAvlRemoveBestFit.h>
70#include <k/kAvlTmpl/kAvlUndef.h>
71
72#endif
73
74
Note: See TracBrowser for help on using the repository browser.