- Timestamp:
- Oct 20, 2010 3:37:15 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 66828
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/table/avlrpv.cpp
r33145 r33268 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT - AVL tree, void *, unique keys.3 * IPRT - AVL tree, void *, range, unique keys. 4 4 */ 5 5 … … 35 35 * AVL configuration. 36 36 */ 37 #define KAVL_FN(a) RTAvl PV##a37 #define KAVL_FN(a) RTAvlrPV##a 38 38 #define KAVL_MAX_STACK 27 /* Up to 2^24 nodes. */ 39 39 #define KAVL_CHECK_FOR_EQUAL_INSERT 1 /* No duplicate keys! */ 40 #define KAVLNODECORE AVLPVNODECORE 41 #define PKAVLNODECORE PAVLPVNODECORE 42 #define PPKAVLNODECORE PPAVLPVNODECORE 43 #define KAVLKEY AVLPVKEY 44 #define PKAVLKEY PAVLPVKEY 45 #define KAVLENUMDATA AVLPVENUMDATA 46 #define PKAVLENUMDATA PAVLPVENUMDATA 47 #define PKAVLCALLBACK PAVLPVCALLBACK 40 #define KAVLNODECORE AVLRPVNODECORE 41 #define PKAVLNODECORE PAVLRPVNODECORE 42 #define PPKAVLNODECORE PPAVLRPVNODECORE 43 #define KAVLKEY AVLRPVKEY 44 #define PKAVLKEY PAVLRPVKEY 45 #define KAVLENUMDATA AVLRPVENUMDATA 46 #define PKAVLENUMDATA PAVLRPVENUMDATA 47 #define PKAVLCALLBACK PAVLRPVCALLBACK 48 #define KAVL_RANGE 1 48 49 49 50 … … 51 52 * AVL Compare macros 52 53 */ 53 #define KAVL_G(key1, key2) ( (const char*)(key1) > (const char*)(key2) ) 54 #define KAVL_E(key1, key2) ( (const char*)(key1) == (const char*)(key2) ) 55 #define KAVL_NE(key1, key2) ( (const char*)(key1) != (const char*)(key2) ) 54 #define KAVL_G(key1, key2) ( (uintptr_t)(key1) > (uintptr_t)(key2) ) 55 #define KAVL_E(key1, key2) ( (uintptr_t)(key1) == (uintptr_t)(key2) ) 56 #define KAVL_NE(key1, key2) ( (uintptr_t)(key1) != (uintptr_t)(key2) ) 57 #define KAVL_R_IS_IDENTICAL(key1B, key2B, key1E, key2E) ( (uintptr_t)(key1B) == (uintptr_t)(key2B) && (uintptr_t)(key1E) == (uintptr_t)(key2E) ) 58 #define KAVL_R_IS_INTERSECTING(key1B, key2B, key1E, key2E) ( (uintptr_t)(key1B) <= (uintptr_t)(key2E) && (uintptr_t)(key1E) >= (uintptr_t)(key2B) ) 59 #define KAVL_R_IS_IN_RANGE(key1B, key1E, key2) KAVL_R_IS_INTERSECTING(key1B, key2, key1E, key2) 56 60 57 61 … … 72 76 #include "avl_Get.cpp.h" 73 77 #include "avl_GetBestFit.cpp.h" 78 #include "avl_Range.cpp.h" 74 79 #include "avl_RemoveBestFit.cpp.h" 75 80 #include "avl_DoWithAll.cpp.h"
Note:
See TracChangeset
for help on using the changeset viewer.