Tools.h++ Class Reference

Table Of Contents
Copy constructor.
RWTPtrMap<K,T,C>(const container_type& m);
Constructs a map by copying all elements from m.
RWTPtrMap<K,T,C>
(value_type* first,value_type* last,
const container_comp& comp = container_comp());
Constructs a map by copying elements from the array of pairs pointed to by first, up to,
but not including, the pair pointed to by last.
Public Member Operators
RWTPtrMap<K,T,C>&
operator=(const RWTPtrMap<K,T,C>& m);
RWTPtrMap<K,T,C>&
operator=(const container_type& m);
Destroys all associations in self and replaces them by copying all associations from m.
bool
operator<(const RWTPtrMap<K,T,C>& m) const;
Returns true if self compares lexicographically less than m, otherwise returns false. Keys
in each collection are dereferenced before being compared. Assumes that type K has
well-defined less-than semantics.
bool
operator==(const RWTPtrMap<K,T,C>& 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. Keys are
dereferenced before being compared.
T*&
operator[](const K* key);
Looks up key and returns a reference to its associated item. If the key is not in the
dictionary, then it will be added with an associated uninitialized pointer of type T*.
Because of this, if there is a possibility that a key will not be in the dictionary, then this
operator should only be used as an lvalue.
Public Member Functions
void
apply(void (*fn)(const K*,T*&,void*),void* d);
void