[#BloombergLP-bdlat_ChoiceFunctions-manipulateSelection]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlat_ChoiceFunctions.adoc[bdlat&lowbar;ChoiceFunctions]::manipulateSelection
:relfileprefix: ../../
:mrdocs:

Invoke `manipulator` on the active selection of `object`&period;

== Synopsis

Declared in `&lt;bdlat&lowbar;choicefunctions&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TYPE,
    class MANIPULATOR&gt;
int
manipulateSelection(
    TYPE* object,
    MANIPULATOR& manipulator);
----

== Description

Invoke the specified `manipulator` on the address of the (modifiable) selection of the specified `object`, supplying `manipulator` with the corresponding selection information structure&period; The supplied `manipulator` must be a callable type that can be called as if it had the following signature&colon; &grave; template &lt;class t&lowbar;INFO&gt; int manipulator(SELECTION&lowbar;TYPE &ast;selection, const t&lowbar;INFO&amp; info)&semi; &grave; Return the value returned from the invocation of `manipulator`&period; The behavior is undefined unless `k&lowbar;UNDEFINED&lowbar;SELECTION&lowbar;ID !&equals; selectionId(&ast;object)`&period;

== Return Value

result of invoking `manipulator`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *object*
| choice object whose selection is manipulated
| *manipulator*
| functor applied to the active selection
|===


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