[#BloombergLP-bslx-MarshallingUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslx.adoc[bslx]::MarshallingUtil :relfileprefix: ../../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct MarshallingUtil; ---- == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslx/MarshallingUtil/_04enum.adoc[`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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslx/MarshallingUtil/getArrayFloat32.adoc[`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`. | xref:BloombergLP/bslx/MarshallingUtil/getArrayFloat64.adoc[`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`. | xref:BloombergLP/bslx/MarshallingUtil/getArrayInt16.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayInt24.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayInt32.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayInt40.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayInt48.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayInt56.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayInt64.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayInt8-057.adoc[`getArrayInt8`] | `getArrayInt8` overloads | xref:BloombergLP/bslx/MarshallingUtil/getArrayUint16.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayUint24.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayUint32.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayUint40.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayUint48.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayUint56.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getArrayUint64.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getFloat32.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getFloat64.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getInt16.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getInt24.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getInt32.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getInt40.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getInt48.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getInt56.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getInt64.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getInt8-03.adoc[`getInt8`] | `getInt8` overloads | xref:BloombergLP/bslx/MarshallingUtil/getUint16.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getUint24.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getUint32.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getUint40.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getUint48.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getUint56.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/getUint64.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putArrayFloat32.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putArrayFloat64.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putArrayInt16-02.adoc[`putArrayInt16`] | `putArrayInt16` overloads | xref:BloombergLP/bslx/MarshallingUtil/putArrayInt24-07.adoc[`putArrayInt24`] | `putArrayInt24` overloads | xref:BloombergLP/bslx/MarshallingUtil/putArrayInt32-02.adoc[`putArrayInt32`] | `putArrayInt32` overloads | xref:BloombergLP/bslx/MarshallingUtil/putArrayInt40-05.adoc[`putArrayInt40`] | `putArrayInt40` overloads | xref:BloombergLP/bslx/MarshallingUtil/putArrayInt48-06.adoc[`putArrayInt48`] | `putArrayInt48` overloads | xref:BloombergLP/bslx/MarshallingUtil/putArrayInt56-0d.adoc[`putArrayInt56`] | `putArrayInt56` overloads | xref:BloombergLP/bslx/MarshallingUtil/putArrayInt64-0d.adoc[`putArrayInt64`] | `putArrayInt64` overloads | xref:BloombergLP/bslx/MarshallingUtil/putArrayInt8-05.adoc[`putArrayInt8`] | `putArrayInt8` overloads | xref:BloombergLP/bslx/MarshallingUtil/putFloat32.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putFloat64.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putInt16.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putInt24.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putInt32.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putInt40.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putInt48.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putInt56.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putInt64.adoc[`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. | xref:BloombergLP/bslx/MarshallingUtil/putInt8.adoc[`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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#