[#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 `<balxml_decoder.h>` Decode `object` from the previously opened input source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> int xref:BloombergLP/balxml/Decoder/decode-0b.adoc[decode](TYPE* object); ---- [.small]#xref:BloombergLP/balxml/Decoder/decode-0b.adoc[_» more..._]# Decode `object` from the file with the specified `filename`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> int xref:BloombergLP/balxml/Decoder/decode-00d.adoc[decode]( char const* filename, TYPE* object); ---- [.small]#xref:BloombergLP/balxml/Decoder/decode-00d.adoc[_» more..._]# Decode `object` from the specified input `stream`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> 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..._]# Decode `object` from the specified stream `buffer`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> 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..._]# Decode `object` from the specified memory `buffer`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> int xref:BloombergLP/balxml/Decoder/decode-07.adoc[decode]( char const* buffer, std::size_t length, TYPE* object, char const* uri = 0); ---- [.small]#xref:BloombergLP/balxml/Decoder/decode-07.adoc[_» more..._]# == Return Value * 0 on success, and a non‐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]#