Tools.h++ Class Reference

Table Of Contents
Returns TRUE if ky is found, otherwise FALSE. If successful, the found key is returned as
a reference in foundKy, and the value is returned as a reference in foundVal. This member
function may throw an RWFileErr exception.
RWstoredValue
findValue(const char* ky)const;
Returns the value for the key that compares equal to the string pointed to by ky. Returns
RWNIL if no key is found. This member function may throw an RWFileErr exception.
int
height();
Returns the height of the RWBTreeOnDisk. A possible exception is RWFileErr.
int
insertKeyAndValue(const char* ky,RWstoredValue v);
Adds a key-value pair to the B-tree. Returns TRUE for successful insertion, FALSE
otherwise. A possible exception is RWFileErr.
unsigned
keyLength() const;
Return the length of the keys for this RWBTreeOnDisk. This number is set when the tree is
first constructed and cannot be changed.
unsigned
minOrder()const;
Return the minimum number of items that may be found in any non-root node in this
RWBTreeOnDisk. This number is set when the tree is first constructed and cannot be
changed.
unsigned
nodeSize() const;
Returns the number of bytes used by each node of this RWBTreeOnDisk. This number is
calculated from the length of the keys and the order of the tree, and cannot be changed. We
make it available to you for your calculations about how many nodes to cache.
unsigned
order()const;
Return half the maximum number of items that may be stored in any node in this
RWBTreeOnDisk. This number is set when the tree is first constructed and cannot be
changed. This method should have been renamed "halfOrder" but is still called "order" for
backward compatibility.
RWBoolean
isEmpty() const;
Returns TRUE if the RWBTreeOnDisk is empty, otherwise FALSE.
void