BloombergLP::bslx::MarshallingUtil

This struct provides a namespace for a suite of functions that facilitate the marshalling of values, and C-style arrays of values, of the fundamental integral and floating-point types in a data-independent, platform-neutral representation.

Synopsis

Declared in <bslx_marshallingutil.h>

struct MarshallingUtil;

Enums

NameDescription
Unnamed enum Platform-independent wire-format sizes (in bytes) for marshalled types. Note that the wire-format size may differ from the size in memory.

Static Member Functions

NameDescription
getArrayFloat32 Load into the specified variables the consecutive four-byte IEEE single-precision floating-point numbers (in host byte order) comprised of each of the specified numVariables leading four-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables.
getArrayFloat64 Load into the specified variables the consecutive eight-byte IEEE double-precision floating-point numbers (in host byte order) comprised of each of the specified numVariables leading eight-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables.
getArrayInt16 Load into the specified variables the consecutive two-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables leading two-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be sign-extended.
getArrayInt24 Load into the specified variables the consecutive three-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables leading three-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be sign-extended.
getArrayInt32 Load into the specified variables the consecutive four-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables leading four-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be sign-extended.
getArrayInt40 Load into the specified variables the consecutive five-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables leading five-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be sign-extended.
getArrayInt48 Load into the specified variables the consecutive six-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables leading six-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be sign-extended.
getArrayInt56 Load into the specified variables the consecutive seven-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables leading seven-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be sign-extended.
getArrayInt64 Load into the specified variables the consecutive eight-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables leading eight-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be sign-extended.
getArrayInt8 getArrayInt8 overloads
getArrayUint16 Load into the specified variables the consecutive two-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables leading two-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be zero-extended.
getArrayUint24 Load into the specified variables the consecutive three-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables leading three-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be zero-extended.
getArrayUint32 Load into the specified variables the consecutive four-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables leading four-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be zero-extended.
getArrayUint40 Load into the specified variables the consecutive five-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables leading five-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be zero-extended.
getArrayUint48 Load into the specified variables the consecutive six-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables leading six-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be zero-extended.
getArrayUint56 Load into the specified variables the consecutive seven-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables leading seven-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be zero-extended.
getArrayUint64 Load into the specified variables the consecutive eight-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables leading eight-byte sequences in the specified buffer (in network byte order). The behavior is undefined unless variables has sufficient capacity, buffer has sufficient contents, and 0 <= numVariables. Note that each of the values will be zero-extended.
getFloat32 Load into the specified variable the four-byte IEEE single-precision floating-point number (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.
getFloat64 Load into the specified variable the eight-byte IEEE double-precision floating-point number (in host byte order) comprised of the initial eight bytes of the specified buffer (in network byte order). The behavior is undefined unless buffer has sufficient contents.
getInt16 Load into the specified variable the two-byte, two's complement integer (in host byte order) comprised of the initial two 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.
getInt24 Load into the specified variable the three-byte, two's complement integer (in host byte order) comprised of the initial three 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.
getInt32 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.
getInt40 Load into the specified variable the five-byte, two's complement 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 sign-extended.
getInt48 Load into the specified variable the six-byte, two's complement integer (in host byte order) comprised of the initial six 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.
getInt56 Load into the specified variable the seven-byte, two's complement integer (in host byte order) comprised of the initial seven 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.
getInt64 Load into the specified variable the eight-byte, two's complement integer (in host byte order) comprised of the initial eight 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.
getInt8 getInt8 overloads
getUint16 Load into the specified variable the two-byte, two's complement unsigned integer (in host byte order) comprised of the initial two 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.
getUint24 Load into the specified variable the three-byte, two's complement unsigned integer (in host byte order) comprised of the initial three 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.
getUint32 Load into the specified variable the four-byte, two's complement unsigned 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 zero-extended.
getUint40 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.
getUint48 Load into the specified variable the six-byte, two's complement unsigned integer (in host byte order) comprised of the initial six 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.
getUint56 Load into the specified variable the seven-byte, two's complement unsigned integer (in host byte order) comprised of the initial seven 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.
getUint64 Load into the specified variable the eight-byte, two's complement unsigned integer (in host byte order) comprised of the initial eight 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.
putArrayFloat32 Load into the specified buffer the consecutive four-byte IEEE single-precision floating-point numbers (in network byte order) comprised of the most-significant four bytes of each of the specified numValues leading entries in the specified values (in host byte order). The behavior is undefined unless buffer has sufficient capacity, values has sufficient contents, and 0 <= numValues. Note that for non-conforming platforms, this operation may be lossy.
putArrayFloat64 Load into the specified buffer the consecutive eight-byte IEEE double-precision floating-point numbers (in network byte order) comprised of the most-significant eight bytes of each of the specified numValues leading entries in the specified values (in host byte order). The behavior is undefined unless buffer has sufficient capacity, values has sufficient contents, and 0 <= numValues. Note that for non-conforming platforms, this operation may be lossy.
putArrayInt16 putArrayInt16 overloads
putArrayInt24 putArrayInt24 overloads
putArrayInt32 putArrayInt32 overloads
putArrayInt40 putArrayInt40 overloads
putArrayInt48 putArrayInt48 overloads
putArrayInt56 putArrayInt56 overloads
putArrayInt64 putArrayInt64 overloads
putArrayInt8 putArrayInt8 overloads
putFloat32 Load into the specified buffer the four-byte IEEE single-precision floating-point number (in network byte order) comprised of the most-significant four bytes of the specified value (in host byte order). The behavior is undefined unless buffer has sufficient capacity. Note that for non-conforming platforms, this operation may be lossy.
putFloat64 Load into the specified buffer the eight-byte IEEE double-precision floating-point number (in network byte order) comprised of the most-significant eight bytes of the specified value (in host byte order). The behavior is undefined unless buffer has sufficient capacity. Note that for non-conforming platforms, this operation may be lossy.
putInt16 Load into the specified buffer the two-byte, two's complement integer (in network byte order) comprised of the least-significant two 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.
putInt24 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.
putInt32 Load into the specified buffer the four-byte, two's complement integer (in network byte order) comprised of the least-significant four 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.
putInt40 Load into the specified buffer the five-byte, two's complement integer (in network byte order) comprised of the least-significant five 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 64-bit values.
putInt48 Load into the specified buffer the six-byte, two's complement integer (in network byte order) comprised of the least-significant six 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 64-bit values.
putInt56 Load into the specified buffer the seven-byte, two's complement integer (in network byte order) comprised of the least-significant seven 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 64-bit values.
putInt64 Load into the specified buffer the eight-byte, two's complement integer (in network byte order) comprised of the least-significant eight 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 64-bit values.
putInt8 Load into the specified buffer the one-byte, two's complement integer comprised of the least-significant one byte of the specified value. 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.