[#BloombergLP-bslfmt-StandardFormatSpecification]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslfmt.adoc[bslfmt]::StandardFormatSpecification
:relfileprefix: ../../
:mrdocs:

A general mechanism to parse and validate a Standard format specification string for a given argument type&period;

== Synopsis

Declared in `&lt;bslfmt&lowbar;standardformatspecification&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;CHAR&gt;
class StandardFormatSpecification
    : public xref:BloombergLP/bslfmt/FormatSpecificationParserEnums.adoc[FormatSpecificationParserEnums]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslfmt/FormatSpecificationParserEnums.adoc[FormatSpecificationParserEnums]`
| Namespace struct holding enums used for parsing&period;
|===

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslfmt/FormatSpecificationParserEnums/Alignment.adoc[`Alignment`] 
| Alignment options parsed from a format specification&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/Category.adoc[`Category`] 
| Format category enumeration&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/FormatType-01.adoc[`FormatType`] 
| Format type enumeration&period;
| xref:BloombergLP/bslfmt/FormatSpecificationParserEnums/ProcessingState.adoc[`ProcessingState`] 
| Parser processing states for a format specification&period;
| xref:BloombergLP/bslfmt/FormatSpecificationParserEnums/Sections.adoc[`Sections`] 
| Bit flags indicating which format&hyphen;spec sections were parsed&period;
| xref:BloombergLP/bslfmt/FormatSpecificationParserEnums/Sign.adoc[`Sign`] 
| Sign options parsed from a format specification&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslfmt/StandardFormatSpecification/2constructor.adoc[`StandardFormatSpecification`]         [.small]#[constructor]#
| Create an uninitialized `StandardFormatSpecification` object&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/alignment.adoc[`alignment`] 
| Return the enumerator representing the requested alignment unless the status is not at least `e&lowbar;STATE&lowbar;PARSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/alternativeFlag.adoc[`alternativeFlag`] 
| Return a boolean indicating if alternative formatting was requested unless the status is not at least `e&lowbar;STATE&lowbar;PARSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/filler.adoc[`filler`] 
| Return a pointer to the character array that stores the parsed filler character that may be a multibyte code point or just a single character unless the status is not `e&lowbar;STATE&lowbar;PARSED` or `e&lowbar;STATE&lowbar;POSTPROCESSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period; See also `numFillerCharacters()` that provides the number of characters in the array returned by this function (at least one)&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/fillerCodePointDisplayWidth.adoc[`fillerCodePointDisplayWidth`] 
| Return the display width of the code point represented by the array returned by `filler()` unless the status is not `e&lowbar;STATE&lowbar;PARSED` or `e&lowbar;STATE&lowbar;POSTPROCESSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/formatType-0a.adoc[`formatType`] 
| Return the enumerator representing the requested format type unless the status is not at least `e&lowbar;STATE&lowbar;PARSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/localeSpecificFlag.adoc[`localeSpecificFlag`] 
| Return a boolean indicating if the locale specific flag was present in the format specification unless the status is not at least `e&lowbar;STATE&lowbar;PARSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period; Note that the locale specific flag is not yet supported hence the attempt to format with a specification that has this flags set will result in an exception indicating that&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/numFillerCharacters.adoc[`numFillerCharacters`] 
| Return the number of filler characters in the array returned by `filler()` unless the status is not `e&lowbar;STATE&lowbar;PARSED` or `e&lowbar;STATE&lowbar;POSTPROCESSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/parse.adoc[`parse`] 
| Parse a format string using the iterator&hyphen;range from the specified `context` assuming it is a Standard format specification for arguments of the specified `category` and if successful update this object with the parsing result, as well as set the status to `e&lowbar;PARSED`&semi; otherwise, if the format specification denoted by the `context` iterator&hyphen;range is not a valid Standard format specification for arguments of category `category` throw a `bsl&colon;&colon;format&lowbar;error` exception&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/postprocess.adoc[`postprocess`] 
| Update the corresponding attributes of this object using the argument values provided by the specified `context` to fill in the values of nested width or precision parameters if such nested parameters exist and set the status of this object to `e&lowbar;STATE&lowbar;POSTPROCESSED`&period; By nested format parameters we mean parameters whose value comes from an argument to the formatter function, and not an literal integer value within the format string&period; In case of an error throw a `bsl&colon;&colon;format&lowbar;error` exception&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/postprocessedPrecision.adoc[`postprocessedPrecision`] 
| Return an optional value representing the requested precision unless the status is not `e&lowbar;STATE&lowbar;POSTPROCESSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period; Note that the returned type is capable of representing more than just an optional integer, but after preprocessing it will have only two possible states&colon; no value, or an integer value&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/postprocessedWidth.adoc[`postprocessedWidth`] 
| Return an optional value representing the requested width unless the status is not `e&lowbar;STATE&lowbar;POSTPROCESSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period; Note that the returned type is capable of representing more than just an optional integer, but after preprocessing it will have only two possible states&colon; no value, or an integer value&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/processingState.adoc[`processingState`] 
| Return the current processing state of this specification&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/sign.adoc[`sign`] 
| Return the enumerator representing the requested sign&hyphen;treatment option unless the status is not at least `e&lowbar;STATE&lowbar;PARSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification/zeroPaddingFlag.adoc[`zeroPaddingFlag`] 
| Return a boolean indicating if zero padding was requested unless the status is not at least `e&lowbar;STATE&lowbar;PARSED` in which case throw a `bsl&colon;&colon;format&lowbar;error` exception indicating that error&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
