BloombergLP::bslx::MarshallingUtil::putInt24

Store a three-byte integer into the specified buffer.

Synopsis

Declared in <bslx_marshallingutil.h>

static
void
putInt24(
    char* buffer,
    int value);

Description

Load into the specified buffer the three-byte, two's complement integer (in network byte order) comprised of the least-significant three bytes of the specified value (in host byte order). The behavior is undefined unless buffer has sufficient capacity. Note that this function applies equally to unsigned 32-bit values, and signed and unsigned 16- and 8-bit values.

Parameters

NameDescription
bufferdestination buffer in network byte order
valuehost-order three-byte integer to write