Add the specified value as space‐separated list data content.

Synopsis

Declared in <balxml_formatter.h>

template<class TYPE>
void
addListData(
    TYPE const& value,
    int formattingMode = 0);

Description

value can be of the following types: char, short, int, bsls::Types::Int64, float, double, bsl::string, bdlt::Datetime, bdlt::Date, and bdlt::Time. Prefix the value with a space(0x20) unless the data being added is the first data on a line. When adding the data makes the line too long, perform line‐wrapping and indentation as determined by the whitespace constraint used when the current element is opened with openElement. If value is of type bsl::string or convertible to bsl::string_view, the presence of invalid input stops the transfer of data to the output specified on construction (see {Valid Strings}). If value is of type bsl::string or convertible to bsl::string_view, any special characters in value are escaped (see {Special Characters}). If value is of type char, it is cast to a signed byte value with a range of [ ‐128 .. 127 ]. Optionally specify the formattingMode to specify the format used to encode value. The behavior is undefined if the call is made when there are no opened elements.

Parameters

Name

Description

value

list‐item data content to add

formattingMode

mode used to format value

Created with MrDocs