1 | /* $Id: kAvloU32.h 2 2007-11-16 16:07:14Z bird $ */
|
---|
2 | /** @file
|
---|
3 | * kAvl - AVL Tree Implementation, KU32 keys, Offset Based.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (c) 2007 knut st. osmundsen <[email protected]>
|
---|
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_kAvloU32_h___
|
---|
28 | #define ___k_kAvloU32_h___
|
---|
29 |
|
---|
30 | typedef KI32 KAVLOU32PTR;
|
---|
31 |
|
---|
32 | typedef struct KAVLOU32
|
---|
33 | {
|
---|
34 | KU32 u32;
|
---|
35 | KU8 cFloorsToGo;
|
---|
36 | KAVLOU32PTR offLeft;
|
---|
37 | KAVLOU32PTR offRight;
|
---|
38 | } KAVLOU32, *PKAVLOU32, **PPKAVLOU32;
|
---|
39 |
|
---|
40 | #define mKey u32
|
---|
41 | #define mHeight cFloorsToGo
|
---|
42 | #define mpLeft offLeft
|
---|
43 | #define mpRight offRight
|
---|
44 |
|
---|
45 | /*#define KAVL_EQUAL_ALLOWED*/
|
---|
46 | #define KAVL_CHECK_FOR_EQUAL_INSERT
|
---|
47 | #define KAVL_MAX_STACK 32
|
---|
48 | /*#define KAVL_RANGE */
|
---|
49 | #define KAVL_OFFSET
|
---|
50 | #define KAVL_STD_KEY_COMP
|
---|
51 | #define KAVLKEY KU32
|
---|
52 | #define KAVLTREEPTR KAVLOU32PTR
|
---|
53 | #define KAVLNODE KAVLOU32
|
---|
54 | #define KAVL_FN(name) kAvloU32 ## name
|
---|
55 | #define KAVL_TYPE(prefix,name) prefix ## KAVLOU32 ## name
|
---|
56 | #define KAVL_INT(name) KAVLOU32INT ## name
|
---|
57 | #define KAVL_DECL(rettype) K_DECL_INLINE(rettype)
|
---|
58 |
|
---|
59 | #include <k/kAvlTmpl/kAvlBase.h>
|
---|
60 | #include <k/kAvlTmpl/kAvlDoWithAll.h>
|
---|
61 | #include <k/kAvlTmpl/kAvlEnum.h>
|
---|
62 | #include <k/kAvlTmpl/kAvlGet.h>
|
---|
63 | #include <k/kAvlTmpl/kAvlGetBestFit.h>
|
---|
64 | #include <k/kAvlTmpl/kAvlGetWithParent.h>
|
---|
65 | #include <k/kAvlTmpl/kAvlRemove2.h>
|
---|
66 | #include <k/kAvlTmpl/kAvlRemoveBestFit.h>
|
---|
67 | #include <k/kAvlTmpl/kAvlUndef.h>
|
---|
68 |
|
---|
69 | #endif
|
---|
70 |
|
---|
71 |
|
---|