Changeset 34218 in vbox for trunk/include/iprt
- Timestamp:
- Nov 21, 2010 5:00:38 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67962
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/avl.h
r33268 r34218 297 297 298 298 299 /** AVL tree of uint64_t ranges. 300 * @{ 301 */ 302 303 /** 304 * AVL key type 305 */ 306 typedef uint64_t AVLRU64KEY; 307 308 /** 309 * AVL Core node. 310 */ 311 typedef struct AVLRU64NodeCore 312 { 313 AVLRU64KEY Key; /**< First key value in the range (inclusive). */ 314 AVLRU64KEY KeyLast; /**< Last key value in the range (inclusive). */ 315 struct AVLRU64NodeCore *pLeft; /**< Pointer to left leaf node. */ 316 struct AVLRU64NodeCore *pRight; /**< Pointer to right leaf node. */ 317 unsigned char uchHeight; /**< Height of this tree: max(height(left), height(right)) + 1 */ 318 } AVLRU64NODECORE, *PAVLRU64NODECORE, **PPAVLRU64NODECORE; 319 320 /** A tree with void pointer keys. */ 321 typedef PAVLRU64NODECORE AVLRU64TREE; 322 /** Pointer to a tree with void pointer keys. */ 323 typedef PPAVLRU64NODECORE PAVLRU64TREE; 324 325 /** Callback function for AVLRU64DoWithAll(). */ 326 typedef DECLCALLBACK(int) AVLRU64CALLBACK(PAVLRU64NODECORE, void *); 327 /** Pointer to callback function for AVLU64DoWithAll(). */ 328 typedef AVLRU64CALLBACK *PAVLRU64CALLBACK; 329 330 /* 331 * Functions. 332 */ 333 RTDECL(bool) RTAvlrU64Insert(PAVLRU64TREE ppTree, PAVLRU64NODECORE pNode); 334 RTDECL(PAVLRU64NODECORE) RTAvlrU64Remove(PAVLRU64TREE ppTree, AVLRU64KEY Key); 335 RTDECL(PAVLRU64NODECORE) RTAvlrU64Get(PAVLRU64TREE ppTree, AVLRU64KEY Key); 336 RTDECL(PAVLRU64NODECORE) RTAvlrU64RangeGet(PAVLRU64TREE ppTree, AVLRU64KEY Key); 337 RTDECL(PAVLRU64NODECORE) RTAvlrU64RangeRemove(PAVLRU64TREE ppTree, AVLRU64KEY Key); 338 RTDECL(PAVLRU64NODECORE) RTAvlrU64GetBestFit(PAVLRU64TREE ppTree, AVLRU64KEY Key, bool fAbove); 339 RTDECL(PAVLRU64NODECORE) RTAvlrU64RemoveBestFit(PAVLRU64TREE ppTree, AVLRU64KEY Key, bool fAbove); 340 RTDECL(int) RTAvlrU64DoWithAll(PAVLRU64TREE ppTree, int fFromLeft, PAVLRU64CALLBACK pfnCallBack, void *pvParam); 341 RTDECL(int) RTAvlrU64Destroy(PAVLRU64TREE ppTree, PAVLRU64CALLBACK pfnCallBack, void *pvParam); 342 343 /** @} */ 344 345 346 299 347 /** AVL tree of RTGCPHYSes - using relative offsets internally. 300 348 * @{
Note:
See TracChangeset
for help on using the changeset viewer.