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

`encodeAnyToStream` overloads

== Synopses

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

Encode the specified `object` to the specified `stream` without instantiating encoding templates at compile time&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/balxml/Encoder/encodeAnyToStream-07.adoc[encodeAnyToStream](
    std::ostream& stream,
    xref:BloombergLP/bdlar/AnyConstRef.adoc[bdlar::AnyConstRef] const& object);
----

[.small]#xref:BloombergLP/balxml/Encoder/encodeAnyToStream-07.adoc[_» more&period;&period;&period;_]#

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; Also note that this function behaves identically to `encodeToStream`, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime&semi; see the `balxml` package documentation for more details&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/balxml/Encoder/encodeAnyToStream-01f.adoc[encodeAnyToStream](
    std::ostream& stream,
    TYPE const& object);
----

[.small]#xref:BloombergLP/balxml/Encoder/encodeAnyToStream-01f.adoc[_» more&period;&period;&period;_]#


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