BloombergLP::bslim::Printer_Helper::print

Format data to stream at the specified indentation.

Synopsis

Declared in <bslim_printer.h>

template<class TYPE>
static
void
print(
    std::ostream& stream,
    TYPE const& data,
    int level,
    int spacesPerLevel);

Description

Format the specified data to the specified output stream at the (absolute value of) the specified indentation level, using the specified spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. Note that this function dispatches to printRaw based on the type traits of the deduced (template parameter) TYPE.

Parameters

NameDescription
streamoutput stream to which data is formatted
datavalue to format
levelindentation level as defined by the BDE print contract
spacesPerLevelspaces per indentation level; negative for single-line output