Tools.h++ Manual

104011 Tandem Computers Incorporated 21-39
21
RWBTreeDictionary
RWBTreeDictionary
|
RWBTree
|
RWCollection
|
RWCollectable
Synopsis
#include <rw/btrdict.h>
RWBTreeDictionary a;
Description Dictionary class implemented as a
B-Tree
, for the storage and retrieval of key-
value pairs. Both the keys and values must inherit abstract base class
RWCollectable
—the elements are ordered internally according to the value
returned by virtual function
compareTo()
of the key (see class
RWCollectable
). Duplicate keys are not allowed.
The
B-Tree
is balanced. That is, nodes are never allowed to have less than a
certain number of items (called the order). The default order is 50, but may be
changed by resetting the value of the static constant
"order"
in the header file
<btree..h>
and recompiling. Larger values will result in shallower trees, but
less efficient use of memory.
Public constructors
RWBTreeDictionary();
Constructs an empty
B-Tree
dictionary.
Public member functions
void applyToKeyAndValue(RWapplyKeyAndValue
ap,void*)
Applies the user-supplied function pointed to by
ap
to each key-value pair of
the collection, in order, from smallest to largest.
virtual RWspace binaryStoreSize() const
Inherited from class
RWCollection
.