Tools.h++ Manual
104011 Tandem Computers Incorporated 21-37
21
virtual RWCollectable* find(const RWCollectable* 
target) const;
Redefined from class 
RWCollection
. The first item that compares equal to 
the object pointed to by 
target 
is returned or nil if no item is found.
virtual unsigned hash() const;
Inherited from class 
RWCollectable
.
unsigned height() const;
Special member function of this class. Returns the height of the tree, defined as 
the number of nodes traversed while descending from the root node to an 
external (leaf) node.
virtual RWCollectable* insert(RWCollectable* c);
Redefined from class 
RWCollection
. Inserts the item 
c 
into the collection and 
returns it. Returns nil if the insertion was unsuccessful. The item 
c 
is inserted 
according to the value returned by 
compareTo()
.
virtual RWClassID isA() const;
Redefined from class 
RWCollectable 
to return 
__RWBTREE
.
virtual RWBoolean isEmpty() const;
Redefined from class 
RWCollection
.
virtual RWBoolean isEqual(const RWCollectable* a) 
const;
Inherited from class 
RWCollectable
.
virtual size_t occurrencesOf(const
RWCollectable* target) const;
Redefined from class 
RWCollection
. Returns the number of items that 
compare equal to 
target
. Since duplicates are not allowed, this function can 
only return 0 or 1.
virtual RWCollectable* remove(const RWCollectable* 
target);
Redefined from class 
RWCollection
. Removes and returns the first item that 
compares equal to the object pointed to by 
target
. Returns nil if no item was 
found.
virtual void removeAndDestroy(const 
RWCollectable* target);
Inherited from class 
RWCollection
.










