This class provides support for a simple mapping array.
The key element type.
The value element type.
A trait object, defining the equality test for elements of type T.
Adds a key and associated value to the map array.
Finds a specific key.
Finds a specific value.
Retrieves the specified key.
Returns the number of entries in the mapping array.
Retrieves the specified value.
Returns the value associated with the given key.
Removes a key and matching value.
Removes all keys and values.
Removes a specific key and matching value.
Returns the key associated with the given value.
Sets the value associated with the given key.
Sets the specific key and value.
CSimpleMap provides support for a simple mapping array of any given type T, managing an unordered array of key elements and their associated values.
The parameter TEqual provides a means of defining an equality function for two elements of type T. By creating a class similar to CSimpleMapEqualHelper, it is possible to alter the behavior of the equality test for any given array. For example, when dealing with an array of pointers, it may be useful to define the equality as depending on the values the pointers reference. The default implementation utilizes operator==().
Unlike other map collections in ATL and MFC, this class is implemented with a simple array, and lookup searches require a linear search. CAtlMap should be used when the array contains a large number of elements.