[#BloombergLP-balber-BerEncoder-encode-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerEncoder.adoc[BerEncoder]::encode :relfileprefix: ../../../ :mrdocs: `encode` overloads == Synopses Declared in `<balber_berencoder.h>` Encode the specified non‐modifiable `value` to the specified `stream`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename TYPE> int xref:BloombergLP/balber/BerEncoder/encode-06.adoc[encode]( std::ostream& stream, TYPE const& value); ---- [.small]#xref:BloombergLP/balber/BerEncoder/encode-06.adoc[_» more..._]# Encode the specified non‐modifiable `value` to the specified `streamBuf`. Return 0 on success, and a non‐zero value otherwise. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename TYPE> int xref:BloombergLP/balber/BerEncoder/encode-03.adoc[encode]( std::streambuf* streamBuf, TYPE const& value); ---- [.small]#xref:BloombergLP/balber/BerEncoder/encode-03.adoc[_» more..._]# == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *stream* | output stream | *value* | value to encode | *streamBuf* | output stream buffer |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#