[#BloombergLP-balxml-Encoder-encode-0c] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Encoder.adoc[Encoder]::encode :relfileprefix: ../../../ :mrdocs: `encode` overloads == Synopses Declared in `<balxml_encoder.h>` Encode the specified non‐modifiable `object` to the specified `formatter`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> int xref:BloombergLP/balxml/Encoder/encode-00.adoc[encode]( xref:BloombergLP/balxml/Formatter.adoc[Formatter]& formatter, TYPE const& object); ---- [.small]#xref:BloombergLP/balxml/Encoder/encode-00.adoc[_» more..._]# Encode the specified non‐modifiable `object` to the specified `stream`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> std::ostream& xref:BloombergLP/balxml/Encoder/encode-03.adoc[encode]( std::ostream& stream, TYPE const& object); ---- [.small]#xref:BloombergLP/balxml/Encoder/encode-03.adoc[_» more..._]# Encode the specified non‐modifiable `object` to the specified `buffer`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> int xref:BloombergLP/balxml/Encoder/encode-08.adoc[encode]( std::streambuf* buffer, TYPE const& object); ---- [.small]#xref:BloombergLP/balxml/Encoder/encode-08.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 | *formatter* | XML formatter to receive the encoded value | *object* | value to encode | *stream* | output stream to receive XML | *buffer* | output stream buffer to receive XML |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#