Tools.h++ Class Reference

Table Of Contents
Public Member Operators
RWTValMultiMap<K,T,C>&
operator=(const RWTValMultiMap<K,T,C>& m);
RWTValMultiMap<K,T,C>&
operator=(const container_type& m) const;
Destroys all elements of self and replaces them by copying all associations from m.
bool
operator<(const RWTValMultiMap<K,T,C>& m);
bool
operator<(const container_type& m) const;
Returns true if self compares lexicographically less than m, otherwise returns false.
Assumes that type K has well-defined less-than semantics (T::operator<(const K&) or
equivalent).
bool
operator==(const RWTValMultiMap<K,T,C>& m) const;
bool
operator==(const container_type& 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 pairs 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& key, T& a, void* d);
void yourfun(const K& key, 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.