[#BloombergLP-balxml-Encoder]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::Encoder
:relfileprefix: ../../
:mrdocs:

This `class` contains the parameterized `encode` functions that encode `bdlat` types in XML format&period;

== Synopsis

Declared in `&lt;balxml&lowbar;encoder&period;h&gt;`

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

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balxml/Encoder/2constructor-0c5.adoc[`Encoder`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/balxml/Encoder/2destructor.adoc[`&#126;Encoder`] [.small]#[destructor]#
| Destroy this object&period; This destruction has no effect on objects pointed&hyphen;to by the pointers provided at construction&period;
| xref:BloombergLP/balxml/Encoder/encode-0c.adoc[`encode`] 
| `encode` overloads
| xref:BloombergLP/balxml/Encoder/encodeAny-0d.adoc[`encodeAny`] 
| `encodeAny` overloads
| xref:BloombergLP/balxml/Encoder/encodeAnyToStream-01b.adoc[`encodeAnyToStream`] 
| `encodeAnyToStream` overloads
| xref:BloombergLP/balxml/Encoder/encodeToStream.adoc[`encodeToStream`] 
| Encode the specified non&hyphen;modifiable `object` to the specified `stream`&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Note that the encoder will use encoder options, error and warning streams specified at the construction time&period;
| xref:BloombergLP/balxml/Encoder/errorSeverity.adoc[`errorSeverity`] 
| Return the severity of the most severe warning or error encountered during the last call to the `encode` method&period; The severity is reset each time `encode` is called&period;
| xref:BloombergLP/balxml/Encoder/errorStream.adoc[`errorStream`] 
| Return pointer to the error stream&period;
| xref:BloombergLP/balxml/Encoder/isCompact.adoc[`isCompact`] 
| Return `true` if the encoding style in the encoder options is defined as `EncodingStyle&colon;&colon;BAEXML&lowbar;COMPACT`, and `false` otherwise&period;
| xref:BloombergLP/balxml/Encoder/loggedMessages.adoc[`loggedMessages`] 
| Return a string containing any error, warning, or trace messages that were logged during the last call to the `encode` method&period; The log is reset each time `encode` is called&period;
| xref:BloombergLP/balxml/Encoder/options.adoc[`options`] 
| Return the encoder options&period;
| xref:BloombergLP/balxml/Encoder/warningStream.adoc[`warningStream`] 
| Return pointer to the warning stream&period;
| xref:BloombergLP/balxml/Encoder/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;Encoder, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/balxml/Encoder_Context.adoc[BloombergLP::balxml::Encoder&lowbar;Context]`
| This `struct` contains state that is maintained during encoding&period; It also contains methods for switching between pretty formatting and compact formatting, based on the encoding options&period;
|===


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