Typedefs | |
| typedef int(*) | BTreeDumpFunc (void *data, INT32 *tagnum, void *username) |
| typedef int(*) | BTreeTestFunc (void *, void *, void *) |
Functions | |
| GEOMLIBEXPORT void * | BTreeAlloc (int numitems, int datasize, BTreeTestFunc testfunc, void *userdata) |
| GEOMLIBEXPORT int | BTreeClear (void *item) |
| GEOMLIBEXPORT int | BTreeDump (void *tree, BTreeDumpFunc, void *userdata) |
| GEOMLIBEXPORT int | BTreeDumpT (void *tree, BTreeDumpFunc, void *userdata) |
| GEOMLIBEXPORT INT32 | BTreeFindKey (void *tree, void *data, INT32 tagnum, int *add) |
| GEOMLIBEXPORT int | BTreeFree (void *tree) |
| GEOMLIBEXPORT void * | BTreeGetUserData (void *tree) |
| GEOMLIBEXPORT int | BTreeNewFunc (void *tree, BTreeTestFunc, void *userdata) |
| GEOMLIBEXPORT INT32 | BTreeSearchKey (void *tree, void *data) |
| GEOMLIBEXPORT void | BTreeSetTestFunc (void *btree, BTreeTestFunc Test, void *userdata, bool TestFuncIsConst) |
| typedef int(*) BTreeDumpFunc(void *data,INT32 *tagnum,void *username) |
| typedef int(*) BTreeTestFunc(void *, void *, void *) |
Tree comparison function used in searching/adding.
Definition at line 89 of file btreefun.h.
| GEOMLIBEXPORT void* BTreeAlloc | ( | int | numitems, | |
| int | datasize, | |||
| BTreeTestFunc | testfunc, | |||
| void * | userdata | |||
| ) |
Allocate a "balanced tree".
| numitems | Number of items to store per node |
| datasize | Size of data to tree in bytes |
| testfunc | Comparison function used in searching/adding |
| userdata | Data passed to comparison function |
| GEOMLIBEXPORT int BTreeClear | ( | void * | item | ) |
Clears item from "balanced tree".
| item | Item to be cleared from tree |
| GEOMLIBEXPORT int BTreeDump | ( | void * | tree, | |
| BTreeDumpFunc | , | |||
| void * | userdata | |||
| ) |
Dump a "balanced tree" in "random" order.
NOTE: This function transverses the tree as it is stored, no order is at all guaranteed!
| tree | Handle to tree instance |
| userdata | User data passed to Dump() |
| GEOMLIBEXPORT int BTreeDumpT | ( | void * | tree, | |
| BTreeDumpFunc | , | |||
| void * | userdata | |||
| ) |
Dump a "balanced tree" in "traversal" order.
NOTE: This function transverses the tree and dumps the data in the order that the comparison function (see BTreeAlloc()) stipulated.
| tree | Handle to tree instance |
| userdata | User data passed to Dump() |
Search "balanced tree" for a specified key, add if no match found.
| tree | Handle to tree instance |
| data | Data to find and add if necessary |
| tagnum | Number to tag data with |
| add | Set if data was added to tree |
| GEOMLIBEXPORT int BTreeFree | ( | void * | tree | ) |
Free a "balanced tree".
| tree | Handle to tree instance |
| GEOMLIBEXPORT void* BTreeGetUserData | ( | void * | tree | ) |
Get the userdata associated with 'tree'.
| tree | Handle to tree instance |
| GEOMLIBEXPORT int BTreeNewFunc | ( | void * | tree, | |
| BTreeTestFunc | , | |||
| void * | userdata | |||
| ) |
Change test function for a "balanced tree".
| tree | Handle to tree instance |
| userdata | Data passed to comparison function |
| GEOMLIBEXPORT INT32 BTreeSearchKey | ( | void * | tree, | |
| void * | data | |||
| ) |
Search "balanced tree" for a specified key.
| tree | Handle to tree instance |
| data | Data to find if exists |
| GEOMLIBEXPORT void BTreeSetTestFunc | ( | void * | btree, | |
| BTreeTestFunc | Test, | |||
| void * | userdata, | |||
| bool | TestFuncIsConst | |||
| ) |
Change test function for a "balanced tree".
This is similar to BTreeNewFunc, but allows you to tell the BTree that the function won't modify the data it's passed. The default behaviour for btrees is to assume that the test function can modify the data passed.
1.5.2