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

This component&hyphen;private class provides a function object used to encode array elements by `bdlat` type category&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;ElementDispatcher;
----

== 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 an &quot;element&quot; object that satisfies one of the `bdlat` type&hyphen;category concepts, and an optional `bdlat&lowbar;TypeCategory` tag type that corresponds to the element&apos;s `bdlat` type category&period; Each function&hyphen;call&hyphen;operator overload encodes a JSON representation of the specified selection to the `formatter` supplied on construction&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baljsn/EncodeImplUtil_ElementDispatcher/2constructor.adoc[`EncodeImplUtil&lowbar;ElementDispatcher`]         [.small]#[constructor]#
| Construct an `EncodeImplUtil&lowbar;ElementDispatcher` object having the specified `formatter`, `logStream`, `isNextElementFirst`, and `options` attributes&period;
| xref:BloombergLP/baljsn/EncodeImplUtil_ElementDispatcher/isNextElementFirst.adoc[`isNextElementFirst`] 
| Return the value of the `isNextElementFirst` attribute of this object&period;
| xref:BloombergLP/baljsn/EncodeImplUtil_ElementDispatcher/operator_call-07.adoc[`operator()`] 
| Function call operators
|===



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