Tools.h++ Class Reference

Table Of Contents
Adds the item a to the collection. Returns true.
void
intersection(const RWTValHashMultiSet<T,H,EQ>& s);
Destructively performs a set theoretic intersection of self and s, replacing the contents of self with the result.
bool
isEmpty() const;
Returns true if there are no items in the collection, false otherwise.
bool
isEquivalent(const RWTValHashMultiSet<T,H,EQ>& s) const;
Returns true if there is set equivalence between self and s, and returns false otherwise.
bool
isProperSubsetOf(const RWTValHashMultiSet<T,H,EQ>& s) const;
Returns true if self is a proper subset of s, and returns false otherwise.
bool
isSubsetOf(const RWTValHashMultiSet<T,H,EQ>& s) const;
Returns true if self is a subset of s, and returns false otherwise.
size_type
occurrencesOf(const_reference a) const;
Returns the number of elements t in self that compares equal to a.
size_type
occurrencesOf(bool (*fn)(const_reference,void*),void* d) const;
Returns the number of elements t in self such that the expression((*fn)(t,d)) is true. fn points to a user-defined tester
function which must have prototype:
bool yourTester(const_reference a, void* d);
Client data may be passed through parameter d.
bool
remove(const_reference a);
Removes the first element t in self that compares equal to a and returns true. Returns false if there is no such element.
bool
remove(bool (*fn)(const_reference,void*), void* d);
Removes the first element t in self such that the expression ((*fn)(t,d)) is true and returns true. Returns false if there is
no such element. fn points to a user-defined tester function which must have prototype:
bool yourTester(const_reference a, void* d);
Client data may be passed through parameter d.
size_type
removeAll(const_reference a);
Removes all elements t in self that compare equal to a. Returns the number of items removed.
size_type
removeAll(bool (*fn)(const_reference,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_reference a, void* d);
Client data may be passed through parameter d.
void
resize(size_type sz);