Ignore:
Timestamp:
Aug 27, 2007, 12:31:38 AM (18 years ago)
Author:
bird
Message:

Made is possible to redefine the AVLNODE members, thus allowing a structure to be used by more than one kAvl instance (i.e. be in more than one tree). Define the callback and enumdata our selves.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kStuff/include/k/kAvloU32.h

    r3561 r3562  
    2828#define ___k_kAvloU32_h___
    2929
    30 typedef KU32 KAVLOU32PTR;
     30typedef KI32 KAVLOU32PTR;
    3131
    3232typedef struct KAVLOU32
    3333{
    34     KU32                Key;
    35     KU8                 uchHeight;
    36     KAVLOU32PTR         pLeft;
    37     KAVLOU32PTR         pRight;
     34    KU32                u32;
     35    KU8                 cFloorsToGo;
     36    KAVLOU32PTR         offLeft;
     37    KAVLOU32PTR         offRight;
    3838} KAVLOU32, *PKAVLOU32, **PPKAVLOU32;
    3939
    40 typedef struct
    41 {
    42     KBOOL               fFromLeft;
    43     KI8                 cEntries;
    44     KU8                 achFlags[32];
    45     PKAVLOU32           aEntries[32];
    46 } KAVLOU32ENUMDATA, *PKAVLOU32ENUMDATA;
    47 
    48 typedef int (* PFNKAVLOU32CALLBACK)(KAVLOU32 *, void *);
     40#define mKey                    u32
     41#define mHeight                 cFloorsToGo
     42#define mpLeft                  offLeft
     43#define mpRight                 offRight
    4944
    5045/*#define KAVL_EQUAL_ALLOWED*/
     
    5651#define KAVLKEY                 KU32
    5752#define KAVLTREEPTR             KAVLOU32PTR
    58 #define KAVLNODECORE            KAVLOU32
     53#define KAVLNODE                KAVLOU32
    5954#define KAVL_FN(name)           kAvloU32 ## name
    6055#define KAVL_TYPE(prefix,name)  prefix ## KAVLOU32 ## name
Note: See TracChangeset for help on using the changeset viewer.