[#BloombergLP-bdlcc-StripedUnorderedMap-visitReadOnly-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/StripedUnorderedMap.adoc[StripedUnorderedMap]::visitReadOnly
:relfileprefix: ../../../
:mrdocs:

`visitReadOnly` overloads

== Synopses

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

Call the specified `visitor` (in an unspecified order) on all 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(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 read&hyphen;only 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; The behavior is undefined if hash map manipulators are invoked from within `visitor`, as it may lead to a deadlock&period; Note that `visitor` can _not_ change the value of the visited elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlcc/StripedUnorderedMap/visitReadOnly-05.adoc[visitReadOnly](xref:BloombergLP/bdlcc/StripedUnorderedMap/ReadOnlyVisitorFunction.adoc[ReadOnlyVisitorFunction] const& visitor) const;
----

[.small]#xref:BloombergLP/bdlcc/StripedUnorderedMap/visitReadOnly-05.adoc[_» more&period;&period;&period;_]#

Call the specified `visitor` on element (if one exists) in this hash map having the specified `key`&period; That is, for `(key, value)`, invoke&colon; &grave; bool visitor(value, key)&semi; &grave; Return the number of elements visited or `&hyphen;1` if `visitor` returned `false`&period; `visitor` has read&hyphen;only access to each element for duration of each invocation&period; The behavior is undefined if hash map manipulators are invoked from within `visitor`, as it may lead to a deadlock&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlcc/StripedUnorderedMap/visitReadOnly-0e.adoc[visitReadOnly](
    KEY const& key,
    xref:BloombergLP/bdlcc/StripedUnorderedMap/ReadOnlyVisitorFunction.adoc[ReadOnlyVisitorFunction] const& visitor) const;
----

[.small]#xref:BloombergLP/bdlcc/StripedUnorderedMap/visitReadOnly-0e.adoc[_» more&period;&period;&period;_]#


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