Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWBTreeDictionary

Module:  Essential Tools Module   Group:  RWCollectable


RWBTreeDictionaryRWBTreeRWCollectionRWCollectable

Local Index

Members

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.

Persistence

Polymorphic

Public Constructors

RWBTreeDictionary();

Public Destructor

virtual ~RWBTreeDictionary();

Public Member Operators

RWBoolean
operator<=(const RWBTreeDictionary& btr) const;

Public Member Functions

void
applyToKeyAndValue(RWapplyKeyAndValue ap,void*);
RWBinaryTree
asBinaryTree();
RWBag
asBag() const;
RWSet
asSet() const;
RWOrdered
asOrderedCollection() const;
RWBinaryTree
asSortedCollection() const:
virtual RWspace
binaryStoreSize() const;
virtual void
clear();
virtual void
clearAndDestroy();
virtual int
compareTo(const RWCollectable* a) const;
virtual RWBoolean
contains(const RWCollectable* target) const;
virtual size_t
entries() const;
virtual RWCollectable*
find(const RWCollectable* target) const;
RWCollectable*
findKeyAndValue(const RWCollectable* target, 
                RWCollectable*& v) const;
RWCollectable*
findValue(const RWCollectable* target) const;
RWCollectable*
findValue(const RWCollectable* target,
          RWCollectable* newValue);
virtual unsigned
hash() const;
unsigned 
height() const;
RWCollectable*
insertKeyAndValue(RWCollectable* key,RWCollectable* value);
virtual RWClassID
isA() const;
virtual RWBoolean
isEmpty() const;
virtual RWBoolean
isEqual(const RWCollectable* a) const;
virtual size_t
occurrencesOf(const RWCollectable* target) const;
virtual RWCollectable*
remove(const RWCollectable* target);
virtual void
removeAndDestroy(const RWCollectable* target);
RWCollectable*
removeKeyAndValue(const RWCollectable* target,
                  RWCollectable*& v);
virtual void
restoreGuts(RWvistream&);
virtual void
restoreGuts(RWFile&);
virtual void
saveGuts(RWvostream&) const;
virtual void
saveGuts(RWFile&) const;
virtual RWCollection*
select(RWtestCollectable testfunc, void* x) const;
virtual RWCollection*
select(RWtestCollectablePair testfunc, void* x) const;
RWStringID
stringID();


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.