BloombergLP::bslx::MarshallingUtil::getUint40

Load a five-byte unsigned integer from the specified buffer.

Synopsis

Declared in <bslx_marshallingutil.h>

static
void
getUint40(
    bsls::Types::Uint64* variable,
    char const* buffer);

Description

Load into the specified variable the five-byte, two's complement unsigned integer (in host byte order) comprised of the initial five bytes of the specified buffer (in network byte order). The behavior is undefined unless buffer has sufficient contents. Note that the value will be zero-extended.

Parameters

NameDescription
variabledestination for the host-order five-byte unsigned integer
buffersource buffer in network byte order