[#BloombergLP-bdlar-ChoiceRef]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::ChoiceRef
:relfileprefix: ../../
:mrdocs:

== Synopsis

Declared in `&lt;bdlar&lowbar;choiceref&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ChoiceRef;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlar/ChoiceRef/2constructor-0f.adoc[`ChoiceRef`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlar/ChoiceRef/accessSelection.adoc[`accessSelection`] 
| Invoke the specified `accessor` on the (non&hyphen;modifiable) selection, supplying `accessor` with the corresponding selection information structure&period; The supplied `accessor` 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 accessor(const SELECTION&amp; refOrValue, const t&lowbar;INFO&amp; info)&semi; &grave; Return the value returned from the invocation of `accessor`&period; The behavior is undefined unless `selectionId() !&equals; &hyphen;1`&period;
| xref:BloombergLP/bdlar/ChoiceRef/hasSelection-0c.adoc[`hasSelection`] 
| `hasSelection` overloads
| xref:BloombergLP/bdlar/ChoiceRef/makeSelection-0bd.adoc[`makeSelection`] 
| `makeSelection` overloads
| xref:BloombergLP/bdlar/ChoiceRef/manipulateSelection.adoc[`manipulateSelection`] 
| Invoke the specified `manipulator` on the address of the (modifiable) selection, 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 &ast;refOrValue, const t&lowbar;INFO&amp; info)&semi; &grave; Return the value returned from the invocation of `manipulator`&period; The behavior is undefined unless `selectionId() !&equals; &hyphen;1`&period;
| xref:BloombergLP/bdlar/ChoiceRef/objectAddress.adoc[`objectAddress`] 
| Return a pointer to the wrapped array&period;
| xref:BloombergLP/bdlar/ChoiceRef/reset.adoc[`reset`] 
| Reset the referred object to the default value&period;
| xref:BloombergLP/bdlar/ChoiceRef/selectionId.adoc[`selectionId`] 
| Return the id of the current selection if the selection is defined, and &hyphen;1 otherwise&period;
| xref:BloombergLP/bdlar/ChoiceRef/vtable.adoc[`vtable`] 
| Return a pointer to the vtable&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlar/bdlat_choiceAccessSelection-0305.adoc[`bdlat&lowbar;choiceAccessSelection`]
| Invoke the specified `accessor` on the current selection of the specified `ref`&period; Return the value from the invocation of `accessor`&period;
| xref:BloombergLP/bdlar/bdlat_choiceHasSelection-03.adoc[`bdlat&lowbar;choiceHasSelection`]
| Return whether the specified `ref` has the selection with the specified `selectionName` and `selectionNameLength`&period;
| xref:BloombergLP/bdlar/bdlat_choiceHasSelection-0c.adoc[`bdlat&lowbar;choiceHasSelection`]
| Return whether the specified `ref` has the selection with the specified `selectionId`&period;
| xref:BloombergLP/bdlar/bdlat_choiceMakeSelection-02.adoc[`bdlat&lowbar;choiceMakeSelection`]
| Make the selection identified by the specified `selectionId` in the specified `ref`&period;
| xref:BloombergLP/bdlar/bdlat_choiceMakeSelection-0d.adoc[`bdlat&lowbar;choiceMakeSelection`]
| Make the selection identified by the specified `selectionName` of the specified `selectionNameLength` in the specified `ref`&period;
| xref:BloombergLP/bdlar/bdlat_choiceManipulateSelection.adoc[`bdlat&lowbar;choiceManipulateSelection`]
| Invoke the specified `manipulator` on the current selection of the specified `ref`&period; Return the value from the invocation of `manipulator`&period;
| xref:BloombergLP/bdlar/bdlat_choiceSelectionId-0ed.adoc[`bdlat&lowbar;choiceSelectionId`]
| Return the id of the current selection if the selection is defined, and &hyphen;1 otherwise&period;
| xref:BloombergLP/bdlar/bdlat_valueTypeReset-08e.adoc[`bdlat&lowbar;valueTypeReset`]
| Reset the specified `ref` to its default&hyphen;constructed state&period;
|===


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