BloombergLP::balber::BerUtil::getValue

Decode the specified value from the specified streamBuf and add the number of bytes consumed to the specified accumNumBytesConsumed.

Synopsis

Declared in <balber_berutil.h>

template<typename TYPE>
static
int
getValue(
    std::streambuf* streamBuf,
    TYPE* value,
    int* accumNumBytesConsumed,
    BerDecoderOptions const& options = BerDecoderOptions());

Description

Return 0 on success, and a non-zero value otherwise. Optionally specify decoding options to control aspects of the decoding. Note that the value consists of the length and contents primitives. Also note that only fundamental C++ types, bsl::string, and BDE date/time types are supported.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
streamBufinput stream buffer
valuedestination for the decoded value
accumNumBytesConsumedrunning total of bytes consumed; incremented by this call
optionsdecoder options controlling decoding behavior