[#BloombergLP-baljsn-EncodeImplUtil_SelectionVisitor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::EncodeImplUtil&lowbar;SelectionVisitor
:relfileprefix: ../../
:mrdocs:

This component&hyphen;private class provides a function object used to encode choice selections that satisfy one of the `bdlat` type&hyphen;category concepts&period;

== Synopsis

Declared in `&lt;baljsn&lowbar;encodeimplutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class FORMATTER&gt;
class EncodeImplUtil&lowbar;SelectionVisitor;
----

== Description

This class&apos;s constructor closes over the `formatter`, `logStream`, and `options` parameters that are shared between all encoding operations provided in this component&period; The function&hyphen;call operator of this class provides an overload set that accepts a &quot;selection&quot; object that satisfies one of the `bdlat` type&hyphen;category concepts, and a &quot;selection info&quot; object that describes various metadata of the selection&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baljsn/EncodeImplUtil_SelectionVisitor/FormattingMode.adoc[`FormattingMode`] 
| Alias for an `int`&hyphen;valued `bdlat&lowbar;FormattingMode` bit&hyphen;field&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baljsn/EncodeImplUtil_SelectionVisitor/2constructor.adoc[`EncodeImplUtil&lowbar;SelectionVisitor`]         [.small]#[constructor]#
| Construct an `EncodeImplUtil&lowbar;SelectionVisitor` object having the specified `formatter`, `logStream`, `isNextObjectFirst`, and `options` attributes&period;
| xref:BloombergLP/baljsn/EncodeImplUtil_SelectionVisitor/isNextObjectFirst.adoc[`isNextObjectFirst`] 
| Return the value of the `isNextObjectFirst` attribute of this object&period;
| xref:BloombergLP/baljsn/EncodeImplUtil_SelectionVisitor/operator_call.adoc[`operator()`] 
| Encode the JSON representation of `selection` using `selectionInfo`&period;
|===



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