[#BloombergLP-balber-BerUtil-getValue-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil.adoc[BerUtil]::getValue
:relfileprefix: ../../../
:mrdocs:

Decode the specified `value` from the specified `streamBuf` and add the number of bytes consumed to the specified `accumNumBytesConsumed`&period;

== Synopsis

Declared in `&lt;balber&lowbar;berutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename TYPE&gt;
static
int
getValue(
    std::streambuf* streamBuf,
    TYPE* value,
    int* accumNumBytesConsumed,
    xref:BloombergLP/balber/BerDecoderOptions.adoc[BerDecoderOptions] const& options = BerDecoderOptions());
----

== Description

Return 0 on success, and a non&hyphen;zero value otherwise&period; Optionally specify decoding `options` to control aspects of the decoding&period; Note that the value consists of the length and contents primitives&period; Also note that only fundamental C&plus;&plus; types, `bsl&colon;&colon;string`, and BDE date&sol;time types are supported&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *streamBuf*
| input stream buffer
| *value*
| destination for the decoded value
| *accumNumBytesConsumed*
| running total of bytes consumed&semi; incremented by this call
| *options*
| decoder options controlling decoding behavior
|===


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