This attribute class characterizes how to configure certain behavior of bdldfp::DecimalUtil::format functions.

Synopsis

Declared in <bdldfp_decimalformatconfig.h>

class DecimalFormatConfig;

Enums

Name

Description

Sign

Sign characters used when formatting decimal values.

Style

Output style used when formatting decimal values.

Member Functions

Name

Description

DecimalFormatConfig [constructor]

Constructors

decimalPoint

Return point character.

expWidth

Return the minimum exponent width.

exponent

Return exponent character.

infinity

Return infinity string representation.

nan

Return NaN string representation.

precision

Return the number of digits of precision in the outputs.

sNan

Return sNaN string representation.

setDecimalPoint

Set the point attribute of this object to the specified value.

setExpWidth

Set the expwidth attribute of this object to the specified value. The behavior is undefined unless value is 1, 2, 3, or 4.

setExponent

Set the exponent attribute of this object to the specified value.

setInfinity

Set the infinity attribute of this object to the specified value. The behavior is undefined unless the pointer to the value remains valid for the lifetime of this object.

setNan

Set the nan attribute of this object to the specified value. The behavior is undefined unless the pointer to the value remains valid for the lifetime of this object.

setPrecision

Set the precision attribute of this object to the specified value. Behavior is undefined unless value >= ‐1.

setSNan

Set the snan attribute of this object to the specified value. The behavior is undefined unless the pointer to the value remains valid for the lifetime of this object.

setShowpoint

Set the showpoint attribute of this object to the specified value.

setSign

Set the sign attribute of this object to the specified value.

setStyle

Set the style attribute of this object to the specified value.

showpoint

Return the showpoint attribute.

sign

Return the sign attribute.

style

Return the style of output format.

Friends

Name

Description

BloombergLP::bdldfp::operator!=

Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two DecimalFormatConfig objects do not have the same value if any of their attributes (respectively) do not have the same value. Note that comparison of two string type attributes are done via 'bsl::strcmp() function.

BloombergLP::bdldfp::operator==

Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two DecimalFormatConfig objects have the same value if each of their attributes (respectively) have the same value. Note that comparison of two string type attributes are done via 'bsl::strcmp() function.

Created with MrDocs