Tools.h++ Class Reference

Table Of Contents
bool
insert(T* a);
Adds the item a to the collection. Returns true.
void
intersection(const RWTPtrMultiSet<T,C>& s);
Sets self to the intersection of self and s. Elements from each set are dereferenced before being
compared.
bool
isEmpty() const;
Returns true if there are no items in the collection, false otherwise.
bool
isEquivalent(const RWTPtrMultiSet<T,C>& s) const;
Returns true if there is set equivalence between self and s, and returns false otherwise.
bool
isProperSubsetOf(const RWTPtrMultiSet<T,C>& s) const;
Returns true if self is a proper subset of s, and returns false otherwise.
bool
isSubsetOf(const RWTPtrMultiSet<T,C>& s) const;
Returns true if self is a subset of s or if self is set equivalent to rhs, false otherwise.
size_type
occurrencesOf(const T* a) const;
Returns the number of elements t in self that compare equal to *a.
size_type
occurrencesOf(bool (*fn)(const T*,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 T* a, void* d);
Client data may be passed through parameter d.
T*
remove(const T* a);
Removes and returns the first element t in self that compares equal to *a. Returns rwnil if there is no
such element.
T*
remove(bool (*fn)(const T*,void*), void* d);
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);