Tools.h++ Class Reference

Table Of Contents
Removes all elements t in self that compares equal with *a. Returns the number of items removed.
size_type
removeAll(bool (*fn)(const T*,void*), void* d);
Removes all elements t in self such that the expression ((*fn)(t,d))is true. Returns the number of items
removed. 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.
set<T*, container_comp,allocator>&
std();
const set<T*, container_comp,allocator>&
std() const;
Returns a reference to the underlying C++-standard collection that serves as the implementation for self.
void
symmetricDifference(const RWTPtrSet<T,C>& s);
Sets self to the symmetric difference of self and s. Elements from each set are dereferenced before being
compared.
void
Union(const RWTPtrSet<T,C>& s);
Sets self to the union of self and s. Elements from each set are dereferenced before being compared.
Note the uppercase "U" in Union to avoid conflict with the C++ reserved word.
Related Global Operators
RWvostream&
operator<<(RWvostream& strm, const RWTPtrSet<T,C>& coll);
RWFile&
operator<<(RWFile& strm, const RWTPtrSet<T,C>& coll);
Saves the collection coll onto the output stream strm, or a reference to it if it has already been saved.
RWvistream&
operator>>(RWvistream& strm, RWTPtrSet<T,C>& coll);
RWFile&
operator>>(RWFile& strm, RWTPtrSet<T,C>& coll);
Restores the contents of the collection coll from the input stream strm.
RWvistream&
operator>>(RWvistream& strm, RWTPtrSet<T,C>*& p);
RWFile&
operator>>(RWFile& strm, RWTPtrSet<T,C>*& p);
Looks at the next object on the input stream strm and either creates a new collection off the heap and
sets p to point to it, or sets p to point to a previously read instance. If a collection is created off the heap,
then you are responsible for deleting it.