Tools.h++ Class Reference

Table Of Contents
Removes all items from the collection and uses operator delete to destroy the objects pointed
to by those items. Do not use self method if multiple pointers to the same object are stored.
(If the equality operator is reflexive, the container cannot hold such multiple pointers.)
bool
contains(const T* a) const;
Returns true if there exists an element t in self such that the expression(*t == *a) is true,
otherwise returns false.
bool
contains(bool (*fn)(const T*,void*), void* d) const;
Returns true if there exists an element t in self such that the expression ((*fn)(t,d)) is true,
otherwise returns false. 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
difference(const RWTPtrHashSet<T,H,EQ>& s);
Sets self to the set-theoretic difference given by (self - s). Elements from each set are
dereferenced before being compared.
iterator
end();
const_iterator
end() const;
Returns an iterator positioned "just past" the last element in self.
size_type
entries() const;
Returns the number of items in self.
float
fillRatio() const;
Returns the ratio entries()/capacity().
const T*
find(const T* a) const;
If there exists an element t in self such that *T compares equal to *a, returns t. Otherwise,
returns rwnil.
const T*
find(bool (*fn)(const T*,void*), void* d) const;
If there exists an element t in self such that the expression ((*fn)(t,d)) is true, returns t.
Otherwise, returns rwnil. fn points to a user-defined tester function which must have
prototype:
bool yourTester(const T* a, void* d);