VirtualBox

Changeset 96 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jan 17, 2007 1:22:21 PM (18 years ago)
Author:
vboxsync
Message:

RTAvlGCPtr.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/avl.h

    r92 r96  
    260260
    261261
     262/** AVL tree of RTGCPTRs.
     263 * @{
     264 */
     265
     266/**
     267 * AVL Core node.
     268 */
     269typedef struct _AVLGCPtrNodeCore
     270{
     271    /** Key value. */
     272    RTGCPTR             Key;
     273    /** Pointer to the left node. */
     274    struct _AVLGCPtrNodeCore *pLeft;
     275    /** Pointer to the right node. */
     276    struct _AVLGCPtrNodeCore *pRight;
     277    /** Height of this tree: max(height(left), height(right)) + 1 */
     278    unsigned char       uchHeight;
     279} AVLGCPTRNODECORE, *PAVLGCPTRNODECORE, **PPAVLGCPTRNODECORE;
     280
     281/** A tree of RTGCPTR keys. */
     282typedef PAVLGCPTRNODECORE     AVLGCPTRTREE;
     283/** Pointer to a tree of RTGCPTR keys. */
     284typedef PPAVLGCPTRNODECORE    PAVLGCPTRTREE;
     285
     286/** Callback function for RTAvlroGCPtrDoWithAll(). */
     287typedef DECLCALLBACK(int)   AVLGCPTRCALLBACK(PAVLGCPTRNODECORE pNode, void *pvUser);
     288/** Pointer to callback function for RTAvlroGCPtrDoWithAll(). */
     289typedef AVLGCPTRCALLBACK *PAVLGCPTRCALLBACK;
     290
     291RTDECL(bool)                    RTAvlGCPtrInsert(PAVLGCPTRTREE pTree, PAVLGCPTRNODECORE pNode);
     292RTDECL(PAVLGCPTRNODECORE)       RTAvlGCPtrRemove(PAVLGCPTRTREE pTree, RTGCPTR Key);
     293RTDECL(PAVLGCPTRNODECORE)       RTAvlGCPtrGet(PAVLGCPTRTREE pTree, RTGCPTR Key);
     294RTDECL(int)                     RTAvlGCPtrDoWithAll(PAVLGCPTRTREE pTree, int fFromLeft, PAVLGCPTRCALLBACK pfnCallBack, void *pvParam);
     295RTDECL(PAVLGCPTRNODECORE)       RTAvlGCPtrGetBestFit(PAVLGCPTRTREE ppTree, RTGCPTR Key, bool fAbove);
     296RTDECL(PAVLGCPTRNODECORE)       RTAvlGCPtrRemoveBestFit(PAVLGCPTRTREE ppTree, RTGCPTR Key, bool fAbove);
     297RTDECL(int)                     RTAvlGCPtrDestroy(PAVLGCPTRTREE pTree, PAVLGCPTRCALLBACK pfnCallBack, void *pvParam);
     298
     299/** @} */
     300
     301
    262302/** AVL tree of RTGCPTRs - using relative offsets internally.
    263303 * @{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette