[#BloombergLP-balxml-Formatter_PrettyImplUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::Formatter_PrettyImplUtil :relfileprefix: ../../ :mrdocs: This utility `struct` provides a namespace for pretty‐printing XML. == Synopsis Declared in `<balxml_formatter_prettyimpl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct Formatter_PrettyImplUtil; ---- == Description It provides a suite of operations used to pretty‐print XML documents given a sequence of tokens to emit. Together with `Formatter_PrettyImplState`, this `struct` provides an implementation of a state machine for such pretty‐printing. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/State.adoc[`State`] | State type used by pretty‐formatter utilities. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/StateId.adoc[`StateId`] | State‐id type used by pretty‐formatter utilities. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/WhitespaceType.adoc[`WhitespaceType`] | Alias for `FormatterWhitespaceType`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/addAttribute.adoc[`addAttribute`] | Add an attribute of the specified `name` and `value` to the currently open element. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/addBlankLine.adoc[`addBlankLine`] | Insert one or two newlines so that a blank line results. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/addComment.adoc[`addComment`] | Write the specified `comment` into the specified `stream`. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/addData.adoc[`addData`] | Add the specified `value` as data content to the specified `stream`. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/addElementAndData.adoc[`addElementAndData`] | Add an element of the specified `name` with the specified `value` as its data content. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/addHeader.adoc[`addHeader`] | Add an XML declaration header with the optionally specified `encoding`. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/addListData.adoc[`addListData`] | Add the specified `value` as list‐item data content to the specified `stream`. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/addNewline.adoc[`addNewline`] | Insert a literal newline into the XML output. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/addValidComment.adoc[`addValidComment`] | Write the specified `comment` into the specified `stream`. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/closeElement.adoc[`closeElement`] | Close the most recently opened element of the specified `name`. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/flush.adoc[`flush`] | Insert the closing `>` if there is an incomplete tag, and flush the output stream. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/openElement.adoc[`openElement`] | Open an element of the specified `name`. | xref:BloombergLP/balxml/Formatter_PrettyImplUtil/reset.adoc[`reset`] | Reset the specified formatter `state` such that it can be used to format a new XML document as if the formatter were just constructed. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#