Tools.h++ Class Reference

Table Of Contents
Removes and returns the first element t in self such that the expression ((*fn)(t,d)) is true.
Returns rwnil if there is no such element. fn points to a user-defined tester function which
must have prototype:
bool yourTester(const T* a, void* d);
Client data may be passed through parameter d.
size_type
removeAll(const T* a);
Removes all elements t in self that compare equal to *a. Returns the number of items
removed.
size_type
removeAll(bool (*fn)(const T*,void*), void* d);
Removes all elements t in self such that the expression ((*fn)(t,d))is true. Returns the number
of items removed. fn points to a user-defined tester function which must have prototype:
bool yourTester(const T* a, void* d);
Client data may be passed through parameter d.
void
resize(size_type sz);
Changes the capacity of self by creating a new hashed set with a capacity of sz . resize copies
every element of self into the new container and finally swaps the internal representation of
the new container with the internal representation of self.
rw_hashset<T*,container_hash, container_eq>&
std();
const rw_hashset<T*,container_hash, container_eq>&
std() const;
Returns a reference to the underlying C++-standard collection that serves as the
implementation for self.
void
symmetricDifference(const RWTPtrHashSet<T,H,EQ>& s);
Destructively performs a set theoretic symmetric difference operation on self and s. Self is
replaced by the result. A symmetric difference can be defined as (A_B)-(A_B).
void
Union(const RWTPtrHashSet<T,H,EQ>& s);
Destructively performs a set theoretic union operation on self and s. Self is replaced by the
result. Note the uppercase "U" in Union to avoid conflict with the C++ reserved word.
Related Global Operators
RWvostream&
operator<<(RWvostream& strm,