Return to the Appendix home page. Otherwise, use the interface to RW TPtrHashMap described in the Class Reference . While duplicates of values are allowed, duplicates of keys are not. Parameters K and V represent the type of the key and the type of the value, respectively, to be inserted into the table. These can be either classes or fundamental types.
Class V can be of any type.
A user-supplied hashing function for type K must be supplied to the constructor when creating a new table. If K is a Rogue Wave class, then this requirement is usually trivial because most Rogue Wave objects know how to return a hashing value. In fact, classes RW CString , RW Date , RW Time , and RW WString contain static member functions called hash that can be supplied to the constructor as is. To find a value, the key is first hashed to determine in which bucket the key and value can be found. The initial number of buckets in the table is set by the constructor.