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

This component&hyphen;private class provides a function object used to encode values 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;ValueDispatcher;
----

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

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baljsn/EncodeImplUtil_ValueDispatcher/FormattingMode.adoc[`FormattingMode`] 
| `FormattingMode` is an alias to the type of an `int`&hyphen;valued `bdlat&lowbar;FormattingMode` bit&hyphen;field&period; A `FormattingMode` value is not valid unless it is equal to an enumerator of `bdlat&lowbar;FormattingMode` or a valid bitwise&hyphen;or of two or more such enumerators&period; See the component&hyphen;level documentation of &lcub;`bdlat&lowbar;formattingmode`&rcub; for a description of the set of valid formatting&hyphen;mode values&period;
|===


== Member Functions

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



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