[#BloombergLP-bdlcc-StripedUnorderedContainerImpl-visitReadOnly-0b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/StripedUnorderedContainerImpl.adoc[StripedUnorderedContainerImpl]::visitReadOnly :relfileprefix: ../../../ :mrdocs: Visit each element with `key` read‐only via the specified `visitor`. == Synopsis Declared in `<bdlcc_stripedunorderedcontainerimpl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int visitReadOnly( KEY const& key, xref:BloombergLP/bdlcc/StripedUnorderedContainerImpl/ReadOnlyVisitorFunction.adoc[ReadOnlyVisitorFunction] const& visitor) const; ---- == Description Serially call the specified `visitor` on each element (if one exists) in this hash map having the specified `key` until every such element has been visited or `visitor` returns `false`. That is, for `(key, value)`, invoke: ` bool visitor(value, key); ` Return the number of elements visited or the negation of that value if visitations stopped because `visitor` returned `false`. `visitor` has read‐only access to each element for duration of each invocation. The behavior is undefined if hash map manipulators are invoked from within `visitor`, as it may lead to a deadlock. == Return Value number of elements visited, or its negation if stopped early == Parameters [cols="1,4"] |=== | Name| Description | *key* | key of the elements to visit | *visitor* | functor invoked with each matching value |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#