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

Invoke `visitor` on the value of every element matching `key`&period;

== Synopsis

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

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

== Description

Serially invoke the specified `visitor` passing the specified `key`, and the address of the value of each element in this hash map having `key`&period; If `key` is not in the map, `value` will be default constructed&period; That is, for each `(key, value)` found, invoke&colon; &grave; bool visitor(VALUE &ast;value, const Key&amp; key)&semi; &grave; If no element in the map has `key`, insert `(key, VALUE())` and invoke `visitor` with `value` pointing to the default constructed value&period; Return the number of elements visited or the negation of that value if visitations stopped because `visitor` returned `false`&period; `visitor`, when invoked, has exclusive access (i&period;e&period;, write access) to each element during each invocation&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 the `setComputedValueFirst` method is more performant than the when the hash map contains a single element for `key`&period; Also note that a return value of `0` implies that an element was inserted&period;

== Return Value

number of elements visited, or its negation if stopped early

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| key of the elements to update or insert
| *visitor*
| functor invoked with each matching value
|===


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