BloombergLP::bslfmt::FormatterSpecificationNumericValue

Type holding a category plus an optional integral value. This is a value semantic type primarily used to represent width and precision of a format specification.

Synopsis

Declared in <bslfmt_formatterspecificationnumericvalue.h>

struct FormatterSpecificationNumericValue;

Enums

NameDescription
Category Categories for parsed numeric format-specification values.

Member Functions

NameDescription
FormatterSpecificationNumericValue [constructor]Constructors
category Return the category attribute of this object.
parse Parse the string in the random-access-iterator range specified by start and end to extract either a hard-coded integer or a nested argument specification. If the specified needInitialDot is true the string is only parsed if *start == '.' and a format_error exception is thrown if the string following the initial dot is empty. If an error occurs throw an exception of type format_error, otherwise update the output start iterator to point to the first unparsed character of the string and store the parsed result into this object.
postprocess If this object holds a non-dynamic nested value (i.e., d_type is e_ARG_ID) update its value using the arguments stored in the specified context and update the type to e_VALUE. If this object holds a dynamic nested value (i.e., d_type is e_NEXT_ARG) throw an exception of type format_error. Otherwise do nothing.
value Return the value attribute of this object. The behavior is undefined if category is either e_DEFAULT or e_NEXT_ARG_ID.
operator== Return true if this object is equal to the specified other object, otherwise return false. Two FormatterSpecificationNumericValue objects are considered equal if their category and value attributes are both equal.

Friends

NameDescription
BloombergLP::bslfmt::FormatterSpecificationNumericValue_ArgVisitorComponent-private type to enable extraction of values held by format contexts during the postprocessing stage of determining the format specification (typically performed by the FormatSpecificationParser). This type exists so that FormatSpecificationParser can update FormatterSpecificationNumericValue to the value contained by a Standard basic_format_arg using the Standard visit_format_arg function.