This struct provides a namespace for utility functions that convert between the decimal floating‐point types of bdldfp_decimal and various other formats.

Synopsis

Declared in <bdldfp_decimalconvertutil.h>

struct DecimalConvertUtil;

Static Member Functions

Name

Description

decimal128FromBID

decimal128FromBID overloads

decimal128FromDPD

decimal128FromDPD overloads

decimal128FromDouble

Return a Decimal128 converted from the specified binary.

decimal128FromFloat

Return a decimal floating‐point number converted from binary.

decimal128FromNetwork

Store into decimal the value decoded from network format at buffer.

decimal128ToBID

DEPRECATED: Use decimalToBID instead.

decimal128ToDPD

DEPRECATED: Use decimalToDPD instead.

decimal128ToDouble

DEPRECATED: Use decimalToDouble instead.

decimal128ToFloat

DEPRECATED: Use decimalToFloat instead.

decimal128ToNetwork

Store decimal in network format into buffer.

decimal32FromBID

decimal32FromBID overloads

decimal32FromDPD

decimal32FromDPD overloads

decimal32FromDouble

Return a Decimal32 converted from the specified binary.

decimal32FromFloat

DEPRECATED: Use decimalFromFloat instead.

decimal32FromNetwork

Store into decimal the value decoded from network format at buffer.

decimal32ToBID

Encode the specified decimal into buffer in BID format.

decimal32ToDPD

Encode the specified decimal into buffer in DPD format.

decimal32ToDouble

Return the double closest to the specified decimal.

decimal32ToFloat

Return the float closest to the specified decimal.

decimal32ToNetwork

Store decimal in network format into buffer.

decimal64FromBID

decimal64FromBID overloads

decimal64FromDPD

decimal64FromDPD overloads

decimal64FromDouble

Return a Decimal64 converted from the specified binary.

decimal64FromFloat

DEPRECATED: Use decimalFromFloat instead.

decimal64FromMultiWidthEncoding

Decode a multi‐width encoded Decimal64 from buffer.

decimal64FromMultiWidthEncodingIfValid

Decode a multi‐width value from buffer if size is valid.

decimal64FromMultiWidthEncodingRaw

Decode a multi‐width value of at most 5 bytes from buffer.

decimal64FromNetwork

Store into decimal the value decoded from network format at buffer.

decimal64FromVariableWidthEncoding

Decode a variable‐width Decimal64 from buffer into decimal.

decimal64ToBID

DEPRECATED: Use decimalToBID instead.

decimal64ToDPD

DEPRECATED: Use decimalToDPD instead.

decimal64ToDouble

Return the double closest to the specified decimal.

decimal64ToFloat

DEPRECATED: Use decimalToFloat instead.

decimal64ToMultiWidthEncoding

Encode decimal in multi‐width format into buffer.

decimal64ToMultiWidthEncodingRaw

Encode decimal into buffer if it fits in 5 or fewer bytes.

decimal64ToNetwork

Store decimal in network format into buffer.

decimal64ToVariableWidthEncoding

Encode decimal in variable‐width format into buffer.

decimalFromBID

decimalFromBID overloads

decimalFromDPD

decimalFromDPD overloads

decimalFromNetwork

decimalFromNetwork overloads

decimalToBID

decimalToBID overloads

decimalToDPD

decimalToDPD overloads

decimalToDouble

decimalToDouble overloads

decimalToFloat

decimalToFloat overloads

decimalToNetwork

decimalToNetwork overloads

isValidMultiWidthSize

Return whether size is valid for multi‐width encoding.

Created with MrDocs