This is a simple, type-safe, and reasonably efficient hash map class,
whose interface is a subset of the interface of STL containers. In
-particular, the interface is modelled after std::map, and the various,
+particular, the interface is modeled after std::map, and the various,
non standard, std::hash\_map.
\wxheading{Example}
CLASSNAME ); // name of the class
\end{verbatim}
-Declares an hash map class named CLASSNAME, with {\tt wxString} keys
+Declares a hash map class named CLASSNAME, with {\tt wxString} keys
and VALUE\_T values.
\begin{verbatim}
CLASSNAME ); // name of the class
\end{verbatim}
-Declares an hash map class named CLASSNAME, with {\tt void*} keys
+Declares a hash map class named CLASSNAME, with {\tt void*} keys
and VALUE\_T values.
\begin{verbatim}
Similarly three equality predicates:
{\tt wxIntegerEqual}, {\tt wxStringEqual}, {\tt wxPointerEqual} are provided.
-Using this you could declare an hash map mapping {\tt int} values
+Using this you could declare a hash map mapping {\tt int} values
to {\tt wxString} like this:
\begin{verbatim}
\twocolitem{wxHashMap::mapped\_type}{Type of the values stored in the hash map}
\twocolitem{wxHashMap::value\_type}{Equivalent to
{\tt struct \{ key\_type first; mapped\_type second \};} }
-\twocolitem{wxHashMap::iterator}{Used to enumerate all the elements in an hash
+\twocolitem{wxHashMap::iterator}{Used to enumerate all the elements in a hash
map; it is similar to a {\tt value\_type*}}
\twocolitem{wxHashMap::const\_iterator}{Used to enumerate all the elements
in a constant hash map; it is similar to a {\tt const value\_type*}}
\twocolitem{wxHashMap::size\_type}{Used for sizes}
+\twocolitem{wxHashMap::Insert\_Result}{The return value for
+\helpref{insert()}{wxhashmapinsert}}
\end{twocollist}
\wxheading{Iterators}
\constfunc{bool}{empty}{}
-Returns true if the hash map does not contain any element, false otherwise.
+Returns true if the hash map does not contain any elements, false otherwise.
\membersection{wxHashMap::end}\label{wxhashmapend}
\membersection{wxHashMap::insert}\label{wxhashmapinsert}
-\func{void}{insert}{\param{const value\_type\&}{ v}}
+\func{Insert\_Result}{insert}{\param{const value\_type\&}{ v}}
-Inserts the given value in the hash map.
+Inserts the given value in the hash map. The return value is
+equivalent to a \texttt{std::pair<wxHashMap::iterator, bool>};
+the iterator points to the inserted element, the boolean value
+is \texttt{true} if \texttt{v} was actually inserted.
\membersection{wxHashMap::operator[]}\label{wxhashmapbracket}
\func{mapped\_type\&}{operator[]}{\param{const key\_type\&}{ key}}
-Use it as an array subscript. The only difference is that if the
+Use the key as an array subscript. The only difference is that if the
given key is not present in the hash map, an element with the
default {\tt value\_type()} is inserted in the table.