Tools.h++ Class Reference

Table Of Contents
bool
operator==(const rw_hashmultimap<K,T,H,EQ>& m) const;
Returns true if self compares equal to m, otherwise returns false. Two collections are equal if
both have the same number of entries, and iterating through both collections produces, in
turn, individual keys that compare equal to each other.
Public Member Functions
void
apply(void (*fn)(const K&, T&, void*),void* d);
void
apply(void (*fn)(const K&,const T&, void*), void* d) const;
Applies the user-defined function pointed to by fn to every association in the collection. This
function must have one of the prototypes:
void yourfun(const K&, T& a, void* d);
void yourfun(const K&, const T& a,void* d);
Client data may be passed through parameter d.
void
applyToKeyAndValue(void (*fn)(const K&, T&, void*),void* d);
void
applyToKeyAndValue
(void (*fn)(const K&,const T&,void*), void* d) const;
This is a deprecated version of the apply member above. It behaves exactly the same as
apply.
iterator
begin();
const_iterator
begin() const;
Returns an iterator positioned at the first pair in 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 key and its associated item will
have its destructor called.
bool
contains(const K& key) const;
Returns true if there exists a key j in self that compares equal to key, otherwise returns false.