avl.h revision 8ce1a88e13f467a3ccaa2df16c02fc56b218e3c5
/** @file
* IPRT - AVL Trees.
*/
/*
* Copyright (C) 1999-2003 knut st. osmundsen <bird-src-spam@anduin.net>
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#ifndef ___iprt_avl_h
#define ___iprt_avl_h
/** @defgroup grp_rt_avl RTAvl - AVL Trees
* @ingroup grp_rt
* @{
*/
/** AVL tree of void pointers.
* @{
*/
/**
* AVL key type
*/
typedef void * AVLPVKEY;
/**
* AVL Core node.
*/
typedef struct _AVLPVNodeCore
{
unsigned char uchHeight; /** Height of this tree: max(height(left), height(right)) + 1 */
/** A tree with void pointer keys. */
typedef PAVLPVNODECORE AVLPVTREE;
/** Pointer to a tree with void pointer keys. */
typedef PPAVLPVNODECORE PAVLPVTREE;
/** Callback function for AVLPVDoWithAll(). */
/** Pointer to callback function for AVLPVDoWithAll(). */
typedef AVLPVCALLBACK *PAVLPVCALLBACK;
/*
* Functions.
*/
RTDECL(int) RTAvlPVDoWithAll(PAVLPVTREE ppTree, int fFromLeft, PAVLPVCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of unsigned long.
* @{
*/
/**
* AVL key type
*/
typedef unsigned long AVLULKEY;
/**
* AVL Core node.
*/
typedef struct _AVLULNodeCore
{
unsigned char uchHeight; /** Height of this tree: max(height(left), height(right)) + 1 */
/** Callback function for AVLULDoWithAll(). */
/** Pointer to callback function for AVLULDoWithAll(). */
typedef AVLULCALLBACK *PAVLULCALLBACK;
/*
* Functions.
*/
RTDECL(int) RTAvlULDoWithAll(PPAVLULNODECORE ppTree, int fFromLeft, PAVLULCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of uint32_t
* @{
*/
/** AVL key type. */
/** AVL Core node. */
typedef struct _AVLU32NodeCore
{
unsigned char uchHeight; /**< Height of this tree: max(height(left), height(right)) + 1 */
/** Callback function for AVLU32DoWithAll() & AVLU32Destroy(). */
/** Pointer to callback function for AVLU32DoWithAll() & AVLU32Destroy(). */
typedef AVLU32CALLBACK *PAVLU32CALLBACK;
/*
* Functions.
*/
RTDECL(int) RTAvlU32DoWithAll(PPAVLU32NODECORE ppTree, int fFromLeft, PAVLU32CALLBACK pfnCallBack, void *pvParam);
/** @} */
/**
* AVL uint32_t type for the relative offset pointer scheme.
*/
typedef uint32_t AVLOU32KEY;
/**
* AVL Core node.
*/
typedef struct _AVLOU32NodeCore
{
/** Key value. */
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** A offset base tree with uint32_t keys. */
typedef AVLOU32 AVLOU32TREE;
/** Pointer to a offset base tree with uint32_t keys. */
typedef AVLOU32TREE *PAVLOU32TREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLOU32TREE *PPAVLOU32NODECORE;
/** Callback function for RTAvloU32DoWithAll(). */
/** Pointer to callback function for RTAvloU32DoWithAll(). */
typedef AVLOU32CALLBACK *PAVLOU32CALLBACK;
RTDECL(int) RTAvloU32DoWithAll(PAVLOU32TREE pTree, int fFromLeft, PAVLOU32CALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of uint32_t, list duplicates.
* @{
*/
/** AVL key type. */
typedef uint32_t AVLLU32KEY;
/** AVL Core node. */
typedef struct _AVLLU32NodeCore
{
unsigned char uchHeight; /**< Height of this tree: max(height(left), height(right)) + 1 */
/** Callback function for RTAvllU32DoWithAll() & RTAvllU32Destroy(). */
/** Pointer to callback function for RTAvllU32DoWithAll() & RTAvllU32Destroy(). */
typedef AVLLU32CALLBACK *PAVLLU32CALLBACK;
/*
* Functions.
*/
RTDECL(PAVLLU32NODECORE) RTAvllU32GetBestFit(PPAVLLU32NODECORE ppTree, AVLLU32KEY Key, bool fAbove);
RTDECL(PAVLLU32NODECORE) RTAvllU32RemoveBestFit(PPAVLLU32NODECORE ppTree, AVLLU32KEY Key, bool fAbove);
RTDECL(int) RTAvllU32DoWithAll(PPAVLLU32NODECORE ppTree, int fFromLeft, PAVLLU32CALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTGCPHYSes - using relative offsets internally.
* @{
*/
/**
* AVL 'pointer' type for the relative offset pointer scheme.
*/
typedef int32_t AVLOGCPHYS;
/**
* AVL Core node.
*/
typedef struct _AVLOGCPhysNodeCore
{
/** Key value. */
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** Padding */
unsigned char Padding[7];
/** A offset base tree with uint32_t keys. */
typedef AVLOGCPHYS AVLOGCPHYSTREE;
/** Pointer to a offset base tree with uint32_t keys. */
typedef AVLOGCPHYSTREE *PAVLOGCPHYSTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLOGCPHYSTREE *PPAVLOGCPHYSNODECORE;
/** Callback function for RTAvloGCPhysDoWithAll() and RTAvloGCPhysDestroy(). */
/** Pointer to callback function for RTAvloGCPhysDoWithAll() and RTAvloGCPhysDestroy(). */
typedef AVLOGCPHYSCALLBACK *PAVLOGCPHYSCALLBACK;
RTDECL(int) RTAvloGCPhysDoWithAll(PAVLOGCPHYSTREE pTree, int fFromLeft, PAVLOGCPHYSCALLBACK pfnCallBack, void *pvParam);
RTDECL(PAVLOGCPHYSNODECORE) RTAvloGCPhysGetBestFit(PAVLOGCPHYSTREE ppTree, RTGCPHYS Key, bool fAbove);
RTDECL(PAVLOGCPHYSNODECORE) RTAvloGCPhysRemoveBestFit(PAVLOGCPHYSTREE ppTree, RTGCPHYS Key, bool fAbove);
RTDECL(int) RTAvloGCPhysDestroy(PAVLOGCPHYSTREE pTree, PAVLOGCPHYSCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTGCPHYS ranges - using relative offsets internally.
* @{
*/
/**
* AVL 'pointer' type for the relative offset pointer scheme.
*/
typedef int32_t AVLROGCPHYS;
/**
* AVL Core node.
*/
typedef struct _AVLROGCPhysNodeCore
{
/** First key value in the range (inclusive). */
/** Last key value in the range (inclusive). */
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** Padding */
unsigned char Padding[7];
/** A offset base tree with uint32_t keys. */
typedef AVLROGCPHYS AVLROGCPHYSTREE;
/** Pointer to a offset base tree with uint32_t keys. */
typedef AVLROGCPHYSTREE *PAVLROGCPHYSTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLROGCPHYSTREE *PPAVLROGCPHYSNODECORE;
/** Callback function for RTAvlroGCPhysDoWithAll() and RTAvlroGCPhysDestroy(). */
/** Pointer to callback function for RTAvlroGCPhysDoWithAll() and RTAvlroGCPhysDestroy(). */
typedef AVLROGCPHYSCALLBACK *PAVLROGCPHYSCALLBACK;
RTDECL(PAVLROGCPHYSNODECORE) RTAvlroGCPhysGetBestFit(PAVLROGCPHYSTREE ppTree, RTGCPHYS Key, bool fAbove);
RTDECL(int) RTAvlroGCPhysDoWithAll(PAVLROGCPHYSTREE pTree, int fFromLeft, PAVLROGCPHYSCALLBACK pfnCallBack, void *pvParam);
RTDECL(int) RTAvlroGCPhysDestroy(PAVLROGCPHYSTREE pTree, PAVLROGCPHYSCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTGCPTRs.
* @{
*/
/**
* AVL Core node.
*/
typedef struct _AVLGCPtrNodeCore
{
/** Key value. */
/** Pointer to the left node. */
struct _AVLGCPtrNodeCore *pLeft;
/** Pointer to the right node. */
struct _AVLGCPtrNodeCore *pRight;
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** A tree of RTGCPTR keys. */
typedef PAVLGCPTRNODECORE AVLGCPTRTREE;
/** Pointer to a tree of RTGCPTR keys. */
typedef PPAVLGCPTRNODECORE PAVLGCPTRTREE;
/** Callback function for RTAvlGCPtrDoWithAll(). */
/** Pointer to callback function for RTAvlGCPtrDoWithAll(). */
typedef AVLGCPTRCALLBACK *PAVLGCPTRCALLBACK;
RTDECL(int) RTAvlGCPtrDoWithAll(PAVLGCPTRTREE pTree, int fFromLeft, PAVLGCPTRCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTGCPTRs - using relative offsets internally.
* @{
*/
/**
* AVL 'pointer' type for the relative offset pointer scheme.
*/
/**
* AVL Core node.
*/
typedef struct _AVLOGCPtrNodeCore
{
/** Key value. */
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** A offset base tree with uint32_t keys. */
typedef AVLOGCPTR AVLOGCPTRTREE;
/** Pointer to a offset base tree with uint32_t keys. */
typedef AVLOGCPTRTREE *PAVLOGCPTRTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLOGCPTRTREE *PPAVLOGCPTRNODECORE;
/** Callback function for RTAvloGCPtrDoWithAll(). */
/** Pointer to callback function for RTAvloGCPtrDoWithAll(). */
typedef AVLOGCPTRCALLBACK *PAVLOGCPTRCALLBACK;
RTDECL(int) RTAvloGCPtrDoWithAll(PAVLOGCPTRTREE pTree, int fFromLeft, PAVLOGCPTRCALLBACK pfnCallBack, void *pvParam);
RTDECL(PAVLOGCPTRNODECORE) RTAvloGCPtrRemoveBestFit(PAVLOGCPTRTREE ppTree, RTGCPTR Key, bool fAbove);
RTDECL(int) RTAvloGCPtrDestroy(PAVLOGCPTRTREE pTree, PAVLOGCPTRCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTGCPTR ranges.
* @{
*/
/**
* AVL Core node.
*/
typedef struct _AVLRGCPtrNodeCore
{
/** First key value in the range (inclusive). */
/** Last key value in the range (inclusive). */
/** Offset to the left leaf node, relative to this field. */
struct _AVLRGCPtrNodeCore *pLeft;
/** Offset to the right leaf node, relative to this field. */
struct _AVLRGCPtrNodeCore *pRight;
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** A offset base tree with RTGCPTR keys. */
typedef PAVLRGCPTRNODECORE AVLRGCPTRTREE;
/** Pointer to a offset base tree with RTGCPTR keys. */
typedef AVLRGCPTRTREE *PAVLRGCPTRTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLRGCPTRTREE *PPAVLRGCPTRNODECORE;
/** Callback function for RTAvlrGCPtrDoWithAll() and RTAvlrGCPtrDestroy(). */
/** Pointer to callback function for RTAvlrGCPtrDoWithAll() and RTAvlrGCPtrDestroy(). */
typedef AVLRGCPTRCALLBACK *PAVLRGCPTRCALLBACK;
RTDECL(int) RTAvlrGCPtrDoWithAll( PAVLRGCPTRTREE pTree, int fFromLeft, PAVLRGCPTRCALLBACK pfnCallBack, void *pvParam);
RTDECL(int) RTAvlrGCPtrDestroy( PAVLRGCPTRTREE pTree, PAVLRGCPTRCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTGCPTR ranges - using relative offsets internally.
* @{
*/
/**
* AVL 'pointer' type for the relative offset pointer scheme.
*/
typedef int32_t AVLROGCPTR;
/**
* AVL Core node.
*/
typedef struct _AVLROGCPtrNodeCore
{
/** First key value in the range (inclusive). */
/** Last key value in the range (inclusive). */
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** A offset base tree with uint32_t keys. */
typedef AVLROGCPTR AVLROGCPTRTREE;
/** Pointer to a offset base tree with uint32_t keys. */
typedef AVLROGCPTRTREE *PAVLROGCPTRTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLROGCPTRTREE *PPAVLROGCPTRNODECORE;
/** Callback function for RTAvlroGCPtrDoWithAll() and RTAvlroGCPtrDestroy(). */
/** Pointer to callback function for RTAvlroGCPtrDoWithAll() and RTAvlroGCPtrDestroy(). */
typedef AVLROGCPTRCALLBACK *PAVLROGCPTRCALLBACK;
RTDECL(PAVLROGCPTRNODECORE) RTAvlroGCPtrGetBestFit(PAVLROGCPTRTREE ppTree, RTGCPTR Key, bool fAbove);
RTDECL(int) RTAvlroGCPtrDoWithAll(PAVLROGCPTRTREE pTree, int fFromLeft, PAVLROGCPTRCALLBACK pfnCallBack, void *pvParam);
RTDECL(int) RTAvlroGCPtrDestroy(PAVLROGCPTRTREE pTree, PAVLROGCPTRCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTGCPTR ranges (overlapping supported) - using relative offsets internally.
* @{
*/
/**
* AVL 'pointer' type for the relative offset pointer scheme.
*/
typedef int32_t AVLROOGCPTR;
/**
* AVL Core node.
*/
typedef struct _AVLROOGCPtrNodeCore
{
/** First key value in the range (inclusive). */
/** Last key value in the range (inclusive). */
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Pointer to the list of string with the same key. Don't touch. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** A offset base tree with uint32_t keys. */
typedef AVLROOGCPTR AVLROOGCPTRTREE;
/** Pointer to a offset base tree with uint32_t keys. */
typedef AVLROOGCPTRTREE *PAVLROOGCPTRTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLROOGCPTRTREE *PPAVLROOGCPTRNODECORE;
/** Callback function for RTAvlrooGCPtrDoWithAll() and RTAvlrooGCPtrDestroy(). */
/** Pointer to callback function for RTAvlrooGCPtrDoWithAll() and RTAvlrooGCPtrDestroy(). */
typedef AVLROOGCPTRCALLBACK *PAVLROOGCPTRCALLBACK;
RTDECL(PAVLROOGCPTRNODECORE) RTAvlrooGCPtrGetBestFit(PAVLROOGCPTRTREE ppTree, RTGCPTR Key, bool fAbove);
RTDECL(int) RTAvlrooGCPtrDoWithAll(PAVLROOGCPTRTREE pTree, int fFromLeft, PAVLROOGCPTRCALLBACK pfnCallBack, void *pvParam);
RTDECL(int) RTAvlrooGCPtrDestroy(PAVLROOGCPTRTREE pTree, PAVLROOGCPTRCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTHCPHYSes - using relative offsets internally.
* @{
*/
/**
* AVL 'pointer' type for the relative offset pointer scheme.
*/
typedef int32_t AVLOHCPHYS;
/**
* AVL Core node.
*/
typedef struct _AVLOHCPhysNodeCore
{
/** Key value. */
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
#endif
/** A offset base tree with uint32_t keys. */
typedef AVLOHCPHYS AVLOHCPHYSTREE;
/** Pointer to a offset base tree with uint32_t keys. */
typedef AVLOHCPHYSTREE *PAVLOHCPHYSTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLOHCPHYSTREE *PPAVLOHCPHYSNODECORE;
/** Callback function for RTAvloHCPhysDoWithAll() and RTAvloHCPhysDestroy(). */
/** Pointer to callback function for RTAvloHCPhysDoWithAll() and RTAvloHCPhysDestroy(). */
typedef AVLOHCPHYSCALLBACK *PAVLOHCPHYSCALLBACK;
RTDECL(int) RTAvloHCPhysDoWithAll(PAVLOHCPHYSTREE pTree, int fFromLeft, PAVLOHCPHYSCALLBACK pfnCallBack, void *pvParam);
RTDECL(PAVLOHCPHYSNODECORE) RTAvloHCPhysGetBestFit(PAVLOHCPHYSTREE ppTree, RTHCPHYS Key, bool fAbove);
RTDECL(PAVLOHCPHYSNODECORE) RTAvloHCPhysRemoveBestFit(PAVLOHCPHYSTREE ppTree, RTHCPHYS Key, bool fAbove);
RTDECL(int) RTAvloHCPhysDestroy(PAVLOHCPHYSTREE pTree, PAVLOHCPHYSCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTIOPORTs - using relative offsets internally.
* @{
*/
/**
* AVL 'pointer' type for the relative offset pointer scheme.
*/
typedef int32_t AVLOIOPORTPTR;
/**
* AVL Core node.
*/
typedef struct _AVLOIOPortNodeCore
{
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Key value. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** A offset base tree with uint32_t keys. */
typedef AVLOIOPORTPTR AVLOIOPORTTREE;
/** Pointer to a offset base tree with uint32_t keys. */
typedef AVLOIOPORTTREE *PAVLOIOPORTTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLOIOPORTTREE *PPAVLOIOPORTNODECORE;
/** Callback function for RTAvloIOPortDoWithAll() and RTAvloIOPortDestroy(). */
/** Pointer to callback function for RTAvloIOPortDoWithAll() and RTAvloIOPortDestroy(). */
typedef AVLOIOPORTCALLBACK *PAVLOIOPORTCALLBACK;
RTDECL(int) RTAvloIOPortDoWithAll(PAVLOIOPORTTREE pTree, int fFromLeft, PAVLOIOPORTCALLBACK pfnCallBack, void *pvParam);
RTDECL(int) RTAvloIOPortDestroy(PAVLOIOPORTTREE pTree, PAVLOIOPORTCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTIOPORT ranges - using relative offsets internally.
* @{
*/
/**
* AVL 'pointer' type for the relative offset pointer scheme.
*/
typedef int32_t AVLROIOPORTPTR;
/**
* AVL Core node.
*/
typedef struct _AVLROIOPortNodeCore
{
/** First key value in the range (inclusive). */
/** Last key value in the range (inclusive). */
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** A offset base tree with uint32_t keys. */
typedef AVLROIOPORTPTR AVLROIOPORTTREE;
/** Pointer to a offset base tree with uint32_t keys. */
typedef AVLROIOPORTTREE *PAVLROIOPORTTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLROIOPORTTREE *PPAVLROIOPORTNODECORE;
/** Callback function for RTAvlroIOPortDoWithAll() and RTAvlroIOPortDestroy(). */
/** Pointer to callback function for RTAvlroIOPortDoWithAll() and RTAvlroIOPortDestroy(). */
typedef AVLROIOPORTCALLBACK *PAVLROIOPORTCALLBACK;
RTDECL(int) RTAvlroIOPortDoWithAll(PAVLROIOPORTTREE pTree, int fFromLeft, PAVLROIOPORTCALLBACK pfnCallBack, void *pvParam);
RTDECL(int) RTAvlroIOPortDestroy(PAVLROIOPORTTREE pTree, PAVLROIOPORTCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** AVL tree of RTHCPHYSes.
* @{
*/
/**
* AVL 'pointer' type for the relative offset pointer scheme.
*/
typedef struct _AVLHCPhysNodeCore *AVLHCPHYSPTR;
/**
* AVL Core node.
*/
typedef struct _AVLHCPhysNodeCore
{
/** Offset to the left leaf node, relative to this field. */
/** Offset to the right leaf node, relative to this field. */
/** Key value. */
/** Height of this tree: max(height(left), height(right)) + 1 */
unsigned char uchHeight;
/** A offset base tree with RTHCPHYS keys. */
typedef AVLHCPHYSPTR AVLHCPHYSTREE;
/** Pointer to a offset base tree with RTHCPHYS keys. */
typedef AVLHCPHYSTREE *PAVLHCPHYSTREE;
/** Pointer to an internal tree pointer.
* In this case it's a pointer to a relative offset. */
typedef AVLHCPHYSTREE *PPAVLHCPHYSNODECORE;
/** Callback function for RTAvlHCPhysDoWithAll() and RTAvlHCPhysDestroy(). */
/** Pointer to callback function for RTAvlHCPhysDoWithAll() and RTAvlHCPhysDestroy(). */
typedef AVLHCPHYSCALLBACK *PAVLHCPHYSCALLBACK;
RTDECL(int) RTAvlHCPhysDoWithAll(PAVLHCPHYSTREE pTree, int fFromLeft, PAVLHCPHYSCALLBACK pfnCallBack, void *pvParam);
RTDECL(PAVLHCPHYSNODECORE) RTAvlHCPhysRemoveBestFit(PAVLHCPHYSTREE ppTree, RTHCPHYS Key, bool fAbove);
RTDECL(int) RTAvlHCPhysDestroy(PAVLHCPHYSTREE pTree, PAVLHCPHYSCALLBACK pfnCallBack, void *pvParam);
/** @} */
/** @} */
#endif