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

`encodeAny` overloads

== Synopses

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/balxml/Encoder/encodeAny-0b.adoc[encodeAny](
    xref:BloombergLP/balxml/Formatter.adoc[Formatter]& formatter,
    xref:BloombergLP/bdlar/AnyConstRef.adoc[bdlar::AnyConstRef] const& object);
----

[.small]#xref:BloombergLP/balxml/Encoder/encodeAny-0b.adoc[_» more&period;&period;&period;_]#

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


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

[.small]#xref:BloombergLP/balxml/Encoder/encodeAny-0a.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/balxml/Encoder/encodeAny-05.adoc[encodeAny](
    std::streambuf* buffer,
    xref:BloombergLP/bdlar/AnyConstRef.adoc[bdlar::AnyConstRef] const& object);
----

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

Encode the specified non&hyphen;modifiable `object` to the specified `formatter`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/balxml/Encoder/encodeAny-06b.adoc[encodeAny](
    xref:BloombergLP/balxml/Formatter.adoc[Formatter]& formatter,
    TYPE const& object);
----

[.small]#xref:BloombergLP/balxml/Encoder/encodeAny-06b.adoc[_» more&period;&period;&period;_]#

Encode the specified non&hyphen;modifiable `object` to the specified `stream`&period;


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

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

Encode the specified non&hyphen;modifiable `object` to the specified `buffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/balxml/Encoder/encodeAny-061.adoc[encodeAny](
    std::streambuf* buffer,
    TYPE const& object);
----

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

== Return Value

* 0 on success, and a non&hyphen;zero value otherwise
* a reference to the modifiable `stream`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *formatter*
| XML formatter to receive the encoded value
| *object*
| type&hyphen;erased value to encode
| *stream*
| output stream to receive XML
| *buffer*
| output stream buffer to receive XML
|===


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