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

== Synopsis

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

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

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlar/ChoiceConstRef/2constructor-07.adoc[`ChoiceConstRef`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlar/ChoiceConstRef/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/ChoiceConstRef/hasSelection-0e.adoc[`hasSelection`] 
| `hasSelection` overloads
| xref:BloombergLP/bdlar/ChoiceConstRef/objectAddress.adoc[`objectAddress`] 
| Return a pointer to the wrapped array&period;
| xref:BloombergLP/bdlar/ChoiceConstRef/selectionId.adoc[`selectionId`] 
| Return the id of the current selection if the selection is defined, and &hyphen;1 otherwise&period;
| xref:BloombergLP/bdlar/ChoiceConstRef/vtable.adoc[`vtable`] 
| Return a pointer to the vtable&period;
| xref:BloombergLP/bdlar/ChoiceConstRef/xsdName.adoc[`xsdName`] 
| Return the `bdlat&lowbar;TypeName&colon;&colon;xsdName` value for the underlying object&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlar/bdlat_TypeName_xsdName-0e9.adoc[`bdlat&lowbar;TypeName&lowbar;xsdName`]
| Return the XSD name for the specified `ref` using the specified `format`&period;
| xref:BloombergLP/bdlar/bdlat_choiceAccessSelection-0308.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-01.adoc[`bdlat&lowbar;choiceHasSelection`]
| Return `true` if the specified `ref` has the selection identified by the specified `selectionId`, and `false` otherwise&period;
| xref:BloombergLP/bdlar/bdlat_choiceHasSelection-0d.adoc[`bdlat&lowbar;choiceHasSelection`]
| Return `true` if the specified `ref` has the selection identified by the specified `selectionName` of the specified `selectionNameLength`, and `false` otherwise&period;
| xref:BloombergLP/bdlar/bdlat_choiceSelectionId-0eb.adoc[`bdlat&lowbar;choiceSelectionId`]
| Return the id of the current selection if the selection is defined, and &hyphen;1 otherwise&period;
|===


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