[#BloombergLP-bdlcc-StripedUnorderedMultiMap-visit-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/StripedUnorderedMultiMap.adoc[StripedUnorderedMultiMap]::visit
:relfileprefix: ../../../
:mrdocs:

Call `visitor` on each element until every element is visited or it returns false&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;stripedunorderedmultimap&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
visit(xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/VisitorFunction.adoc[VisitorFunction] const& visitor);
----

== Description

Call the specified `visitor` (in an unspecified order) on the elements in this hash table until each such element has been visited or `visitor` returns `false`&period; That is, for `(key, value)`, invoke&colon; &grave; bool visitor(&amp;value, key)&semi; &grave; Return the number of elements visited or the negation of that value if visitations stopped because `visitor` returned `false`&period; `visitor` has exclusive access (i&period;e&period;, write access) to each element for duration of each invocation&period; Every element present in this hash map at the time `visit` is invoked will be visited unless it is removed before `visitor` is called for that element&period; Each visitation is done by the calling thread and the order of visitation is not specified&period; Elements inserted during the execution of `visit` may or may not be visited&period; The behavior is undefined if hash map manipulators and `getValue&ast;` methods are invoked from within `visitor`, as it may lead to a deadlock&period; Note that `visitor` can change the value of the visited elements&period;

== Return Value

number of elements visited, or its negation if stopped early

== Parameters

[cols="1,4"]
|===
| Name| Description
| *visitor*
| functor invoked with each element
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
