Tools.h++ Class Reference

Table Of Contents
iterator
begin();
const_iterator
begin() const;
Returns an iterator positioned at the first element of self.
size_type
capacity() const;
Returns the number of buckets(slots) available in the underlying hash representation. See resize below.
void
clear();
Clears the collection by removing all items from self. Each item will have its destructor called.
bool
contains(const_reference a) const;
Returns true if there exists an element t in self that compares equal to a, otherwise returns false.
bool
contains(bool (*fn)(const_reference,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_reference a, void* d);
Client data may be passed through parameter d.
void
difference(const RWTValHashMultiSet<T,H,EQ>& s);
Sets self to the set-theoretic difference given by (self - s).
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().
bool
find(const_reference a,T& k) const;
If there exists an element t in self such that the expression (t == a) is true, assigns t to k and returns true. Otherwise,
returns false and leaves the value of k unchanged.
bool
find(bool (*fn)(const_reference,void*),void* d,T& k) const;
If there exists an element t in self that compares equal to a, assigns t to k and returns true. Otherwise, returns false and
leaves the value of k unchanged. 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
insert(const_reference a);