Tools.h++ Class Reference

Table Of Contents
C++-standard header file <functional> is an example.
RWTValMultiSet<T,C> may contain multiple items that compare equal to each other.
(RWTValSet<T,C> will not accept an item that compares equal to an item already in the
collection.)
Persistence
Isomorphic.
Examples
In this example, a multi-set of RWCStrings is exercised.
//
// tvmsstr.cpp
//
#include <rw/tvmset.h>
#include <rw/cstring.h>
#include <iostream.h>
main(){
RWTValMultiSet<RWCString,less<RWCString> > set;
set.insert("one");
set.insert("two");
set.insert("three");
set.insert("one"); // OK, duplicates allowed
cout << set.entries() << endl; // Prints "4"
return 0;
}
Related Classes
Class RWTValSet<T,C> offers the same interface to a collection that will not accept multiple
items that compare equal to each other. RWTValMultiMap<K,T,C> maintains a collection of
key-value pairs.
Class multiset<T,C,allocator> is the C++-standard collection that serves as the underlying
implementation for RWTValMultiSet<T,C>.