The following two tables summarize the Tools.h++ Smalltalk-like classes. Table 1 lists all 17 classes, along with their typedefs, iterators, and implementations. Table 2 illustrates the class hierachy.
Class |
Iterator |
Smalltalk typedef (deprecated) |
Implemented as |
RWBag |
RWBagIterator |
Bag |
Dictionary of occurrences |
RWBinaryTree |
RWBinaryTreeIterator |
SortedCollection |
Binary tree |
RWBTree |
B-tree in memory |
||
RWBTreeDictionary |
B-tree of associations |
||
RWCollection |
RWIterator |
Collection |
Abstract base class |
RWDlistCollectables |
RWDlistCollectablesIterator |
Doubly-linked list |
|
RWHashTable |
RWHashTableIterator |
Hash table |
|
RWHashDictionary |
RWHashDictionaryIterator |
Dictionary |
Hash table of associations |
RWIdentityDictionary |
RWHashDictionaryIterator |
IdentityDictionary |
Hash table of associations |
RWIdentitySet |
RWSetIterator |
IdentitySet |
Hash table |
RWOrdered |
RWOrderedIterator |
OrderedCollection |
Vector of pointers |
RWSequenceable |
RWIterator |
Sequenceable |
Abstract base class |
RWSet |
RWSetIterator |
Set |
Hash table |
RWSlistCollectables |
RWSlistCollectablesIterator |
LinkedList |
Singly-linked list |
RWSlistCollectables-Queue |
(n/a) |
Queue |
Singly-linked list |
RWSlistCollectables-Stack |
(n/a) |
Stack |
Singly-linked list |
RWSortedVector |
RWSortedVectorIterator |
Vector of pointers, using insertion sort |
Table 2. The class hierarchy of the Smalltalk-like collection classes.
Note that some of these classes use multiple-inheritance: this hierarchy is shown relative to the RWCollectable base class.
RWCollectable RWCollection (abstract base class) RWBinaryTree RWBTree RWBTreeDictionary RWBag RWSequenceable (abstract base class) RWDlistCollectables (Doubly-linked lists) RWOrdered RWSortedVector RWSlistCollectables (Singly-linked lists) RWSlistCollectablesQueue RWSlistCollectablesStack RWHashTable RWSet RWIdentitySet RWHashDictionary RWIdentityDictionary