BloombergLP::bslfmt::FormatterIntegralBase

This struct is a base class for bsl::formatter specializations for integer types as well as for other types that can be represented as integer (i.e. bool, character and pointer types). This is a private class and should not be used directly. The formatting of variables of a certain type is performed using the corresponding classes inherited from this one. Accordingly, the auxiliary functions used are declared protected.

Synopsis

Declared in <bslfmt_formatterintegralbase.h>

template<
    class t_VALUE,
    class t_CHAR>
struct FormatterIntegralBase;

Member Functions

NameDescription
formatPrefix Create the prefix for output of the specified value and write it into the character buffer starting a the specified prefixStorage and having the specified storageSize. Return the address one past the last character. Throw bsl::format_error if parsed format specification is intended for non-integer type.
formatValue Create the string representation of the specified value and write it into the character buffer starting at the specified valueStorage and having the specified storageSize. Return the address one past the last character. Throw bsl::format_error if parsed format specification is intended for non-integer type or the value is not in the range of representable values for the (template parameter) t_CHAR with character type specification.
outputValue Copy the prefix of value string representation starting at the specified prefixBegin and ending at the specified prefixEnd as well as representation itself starting at the specified valueBegin and ending at the specified valueEnd to the output that the output iterator of the formatContext points to. Throw bsl::format_error if parsed format specification states incorrect alignment type.
parse Parse the specified parseContext and return an iterator, pointing to the beginning of the format string.
specification Return a reference to the specification of this formatter.

Derived Classes

NameDescription
FormatterPointer_Nullptr This struct is a specialization of the bsl::formatter template for the bsl::nullptr_t.