[#BloombergLP-balxml-Decoder-decode-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Decoder.adoc[Decoder]::decode
:relfileprefix: ../../../
:mrdocs:

`decode` overloads

== Synopses

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

Decode `object` from the previously opened input source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/balxml/Decoder/decode-0b.adoc[decode](TYPE* object);
----

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

Decode `object` from the file with the specified `filename`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/balxml/Decoder/decode-00d.adoc[decode](
    char const* filename,
    TYPE* object);
----

[.small]#xref:BloombergLP/balxml/Decoder/decode-00d.adoc[_» more&period;&period;&period;_]#

Decode `object` from the specified input `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
std::istream&
xref:BloombergLP/balxml/Decoder/decode-0c.adoc[decode](
    std::istream& stream,
    TYPE* object,
    char const* uri = 0);
----

[.small]#xref:BloombergLP/balxml/Decoder/decode-0c.adoc[_» more&period;&period;&period;_]#

Decode `object` from the specified stream `buffer`&period;


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

[.small]#xref:BloombergLP/balxml/Decoder/decode-009.adoc[_» more&period;&period;&period;_]#

Decode `object` from the specified memory `buffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/balxml/Decoder/decode-07.adoc[decode](
    char const* buffer,
    std::size&lowbar;t length,
    TYPE* object,
    char const* uri = 0);
----

[.small]#xref:BloombergLP/balxml/Decoder/decode-07.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
| *object*
| object being decoded
| *filename*
| path of the XML file to open
| *stream*
| input stream providing XML data
| *uri*
| optional URI identifying the input document in error messages
| *buffer*
| buffer providing XML data
| *length*
| number of bytes in `buffer`
|===


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