Tools.h++ Manual
22-92 104011 Tandem Computers Incorporated
22
RWTValHashSet<T>
RWTValHashSet<T>
|
RWTValHashTable<T>
Synopsis
#include <rw/tvhset.h>
unsigned hashFun(const T&);
RWTValHashSet(hashFun) set;
Description
RWTValHashSet<T>
is a derived class of
RWTValHashTable<T>
where the
insert()
function has been overridden to accept only one item of a given
value. Hence, each item in the collection will be unique.
As with class
RWTValHashTable<T>
, you must supply a hashing function to
the constructor.
The class
T
must have:
• well-defined copy semantics (
T::T(const T&)
or equiv.);
• well-defined assignment semantics (
T::operator=(const T&)
or equiv.);
• well-defined equality semantics (
T::operator==(const T&)
).