BloombergLP::bslx::MarshallingUtil::getInt32

Load a four-byte integer from the specified buffer.

Synopsis

Declared in <bslx_marshallingutil.h>

static
void
getInt32(
    int* variable,
    char const* buffer);

Description

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

Parameters

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