Changeset 449 in vbox
- Timestamp:
- Jan 30, 2007 11:03:57 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 18030
- Location:
- trunk
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/avl.h
r96 r449 284 284 typedef PPAVLGCPTRNODECORE PAVLGCPTRTREE; 285 285 286 /** Callback function for RTAvl roGCPtrDoWithAll(). */286 /** Callback function for RTAvlGCPtrDoWithAll(). */ 287 287 typedef DECLCALLBACK(int) AVLGCPTRCALLBACK(PAVLGCPTRNODECORE pNode, void *pvUser); 288 /** Pointer to callback function for RTAvl roGCPtrDoWithAll(). */288 /** Pointer to callback function for RTAvlGCPtrDoWithAll(). */ 289 289 typedef AVLGCPTRCALLBACK *PAVLGCPTRCALLBACK; 290 290 … … 333 333 typedef AVLOGCPTRTREE *PPAVLOGCPTRNODECORE; 334 334 335 /** Callback function for RTAvl roGCPtrDoWithAll(). */335 /** Callback function for RTAvloGCPtrDoWithAll(). */ 336 336 typedef DECLCALLBACK(int) AVLOGCPTRCALLBACK(PAVLOGCPTRNODECORE pNode, void *pvUser); 337 /** Pointer to callback function for RTAvl roGCPtrDoWithAll(). */337 /** Pointer to callback function for RTAvloGCPtrDoWithAll(). */ 338 338 typedef AVLOGCPTRCALLBACK *PAVLOGCPTRCALLBACK; 339 339 … … 345 345 RTDECL(PAVLOGCPTRNODECORE) RTAvloGCPtrRemoveBestFit(PAVLOGCPTRTREE ppTree, RTGCPTR Key, bool fAbove); 346 346 RTDECL(int) RTAvloGCPtrDestroy(PAVLOGCPTRTREE pTree, PAVLOGCPTRCALLBACK pfnCallBack, void *pvParam); 347 348 /** @} */ 349 350 351 /** AVL tree of RTGCPTR ranges. 352 * @{ 353 */ 354 355 /** 356 * AVL Core node. 357 */ 358 typedef struct _AVLRGCPtrNodeCore 359 { 360 /** First key value in the range (inclusive). */ 361 RTGCPTR Key; 362 /** Last key value in the range (inclusive). */ 363 RTGCPTR KeyLast; 364 /** Offset to the left leaf node, relative to this field. */ 365 struct _AVLRGCPtrNodeCore *pLeft; 366 /** Offset to the right leaf node, relative to this field. */ 367 struct _AVLRGCPtrNodeCore *pRight; 368 /** Height of this tree: max(height(left), height(right)) + 1 */ 369 unsigned char uchHeight; 370 } AVLRGCPTRNODECORE, *PAVLRGCPTRNODECORE; 371 372 /** A offset base tree with RTGCPTR keys. */ 373 typedef PAVLRGCPTRNODECORE AVLRGCPTRTREE; 374 /** Pointer to a offset base tree with RTGCPTR keys. */ 375 typedef AVLRGCPTRTREE *PAVLRGCPTRTREE; 376 377 /** Pointer to an internal tree pointer. 378 * In this case it's a pointer to a relative offset. */ 379 typedef AVLRGCPTRTREE *PPAVLRGCPTRNODECORE; 380 381 /** Callback function for RTAvlrGCPtrDoWithAll() and RTAvlrGCPtrDestroy(). */ 382 typedef DECLCALLBACK(int) AVLRGCPTRCALLBACK(PAVLRGCPTRNODECORE pNode, void *pvUser); 383 /** Pointer to callback function for RTAvlrGCPtrDoWithAll() and RTAvlrGCPtrDestroy(). */ 384 typedef AVLRGCPTRCALLBACK *PAVLRGCPTRCALLBACK; 385 386 RTDECL(bool) RTAvlrGCPtrInsert( PAVLRGCPTRTREE pTree, PAVLRGCPTRNODECORE pNode); 387 RTDECL(PAVLRGCPTRNODECORE) RTAvlrGCPtrRemove( PAVLRGCPTRTREE pTree, RTGCPTR Key); 388 RTDECL(PAVLRGCPTRNODECORE) RTAvlrGCPtrGet( PAVLRGCPTRTREE pTree, RTGCPTR Key); 389 RTDECL(PAVLRGCPTRNODECORE) RTAvlrGCPtrGetBestFit( PAVLRGCPTRTREE pTree, RTGCPTR Key, bool fAbove); 390 RTDECL(PAVLRGCPTRNODECORE) RTAvlrGCPtrRangeGet( PAVLRGCPTRTREE pTree, RTGCPTR Key); 391 RTDECL(PAVLRGCPTRNODECORE) RTAvlrGCPtrRangeRemove( PAVLRGCPTRTREE pTree, RTGCPTR Key); 392 RTDECL(int) RTAvlrGCPtrDoWithAll( PAVLRGCPTRTREE pTree, int fFromLeft, PAVLRGCPTRCALLBACK pfnCallBack, void *pvParam); 393 RTDECL(int) RTAvlrGCPtrDestroy( PAVLRGCPTRTREE pTree, PAVLRGCPTRCALLBACK pfnCallBack, void *pvParam); 394 RTDECL(PAVLRGCPTRNODECORE) RTAvlrGCPtrGetRoot( PAVLRGCPTRTREE pTree); 395 RTDECL(PAVLRGCPTRNODECORE) RTAvlrGCPtrGetLeft( PAVLRGCPTRNODECORE pNode); 396 RTDECL(PAVLRGCPTRNODECORE) RTAvlrGCPtrGetRight( PAVLRGCPTRNODECORE pNode); 347 397 348 398 /** @} */ -
trunk/src/VBox/Runtime/Makefile
r405 r449 128 128 table/avloioport.cpp \ 129 129 table/avlpv.cpp \ 130 table/avlrgcptr.cpp \ 130 131 table/avlrogcphys.cpp \ 131 132 table/avlrogcptr.cpp \ -
trunk/src/VBox/Runtime/table/avlrgcptr.cpp
r411 r449 1 1 /* $Id$ */ 2 2 /** @file 3 * InnoTek Portable Runtime - AVL tree, RTGCPTR, range, unique keys , offset pointers.3 * InnoTek Portable Runtime - AVL tree, RTGCPTR, range, unique keys. 4 4 */ 5 5 … … 31 31 * AVL configuration. 32 32 */ 33 #define KAVL_FN(a) RTAvlr oGCPtr##a33 #define KAVL_FN(a) RTAvlrGCPtr##a 34 34 #define KAVL_MAX_STACK 27 /* Up to 2^24 nodes. */ 35 35 #define KAVL_CHECK_FOR_EQUAL_INSERT 1 /* No duplicate keys! */ 36 #define KAVLNODECORE AVLR OGCPTRNODECORE37 #define PKAVLNODECORE PAVLR OGCPTRNODECORE38 #define PPKAVLNODECORE PPAVLR OGCPTRNODECORE36 #define KAVLNODECORE AVLRGCPTRNODECORE 37 #define PKAVLNODECORE PAVLRGCPTRNODECORE 38 #define PPKAVLNODECORE PPAVLRGCPTRNODECORE 39 39 #define KAVLKEY RTGCPTR 40 40 #define PKAVLKEY PRTGCPTR 41 #define KAVLENUMDATA AVLROGCPTRENUMDATA 42 #define PKAVLENUMDATA PAVLROGCPTRENUMDATA 43 #define PKAVLCALLBACK PAVLROGCPTRCALLBACK 44 #define KAVL_OFFSET 1 41 #define KAVLENUMDATA AVLRGCPTRENUMDATA 42 #define PKAVLENUMDATA PAVLRGCPTRENUMDATA 43 #define PKAVLCALLBACK PAVLRGCPTRCALLBACK 45 44 #define KAVL_RANGE 1 46 45
Note:
See TracChangeset
for help on using the changeset viewer.