Constructors

Synopses

Declared in <balxml_formatter.h>

Construct an object to format XML data into the specified output stream. Optionally specify initial indentLevel, spacesPerLevel, and wrapColumn for formatting, and a basicAllocator used to supply memory.

Formatter(
    std::ostream& output,
    int indentLevel = 0,
    int spacesPerLevel = 4,
    int wrapColumn = 80,
    bslma::Allocator* basicAllocator = 0);

Construct an object to format XML data into the specified output stream or streambuf. Optionally specify encoderOptions, initial indentLevel, spacesPerLevel, and wrapColumn for formatting. An indentLevel of 0 (the default) indicates the root element will have no indentation. A wrapColumn of 0 will cause the formatter to behave as though the line length were infinite, but will still insert newlines and indent when starting a new element. A wrapColumn of ‐1 will cause output to be formatted in "compact" mode ‐‐ with no added newlines or indentation. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently install default allocator is used. The behavior is undefined if the output stream or streambuf is destroyed before

Formatter(
    std::streambuf* output,
    int indentLevel = 0,
    int spacesPerLevel = 4,
    int wrapColumn = 80,
    bslma::Allocator* basicAllocator = 0);

Construct a formatter that writes to the specified output stream using the specified encoderOptions and formatting parameters.

Formatter(
    std::ostream& output,
    EncoderOptions const& encoderOptions,
    int indentLevel = 0,
    int spacesPerLevel = 4,
    int wrapColumn = 80,
    bslma::Allocator* basicAllocator = 0);

Construct a formatter that writes to the specified output streambuf using the specified encoderOptions and formatting parameters.

Formatter(
    std::streambuf* output,
    EncoderOptions const& encoderOptions,
    int indentLevel = 0,
    int spacesPerLevel = 4,
    int wrapColumn = 80,
    bslma::Allocator* basicAllocator = 0);

Created with MrDocs