Quick Links: |
#include <balxml_typesprintutil.h>
Static Public Member Functions | |
template<class TYPE > | |
static bsl::ostream & | print (bsl::ostream &stream, const TYPE &object, int formattingMode, const EncoderOptions *encoderOptions=0) |
template<class TYPE > | |
static bsl::ostream & | printBase64 (bsl::ostream &stream, const TYPE &object, const EncoderOptions *encoderOptions=0) |
template<class TYPE > | |
static bsl::ostream & | printDecimal (bsl::ostream &stream, const TYPE &object, const EncoderOptions *encoderOptions=0) |
template<class TYPE > | |
static bsl::ostream & | printDefault (bsl::ostream &stream, const TYPE &object, const EncoderOptions *encoderOptions=0) |
template<class TYPE > | |
static bsl::ostream & | printHex (bsl::ostream &stream, const TYPE &object, const EncoderOptions *encoderOptions=0) |
template<class TYPE > | |
static bsl::ostream & | printList (bsl::ostream &stream, const TYPE &object, const EncoderOptions *encoderOptions=0) |
template<class TYPE > | |
static bsl::ostream & | printText (bsl::ostream &stream, const TYPE &object, const EncoderOptions *encoderOptions=0) |
This struct
contains functions for printing objects to output streams using various formatting modes.
See Component balxml_typesprintutil
static bsl::ostream& balxml::TypesPrintUtil::print | ( | bsl::ostream & | stream, | |
const TYPE & | object, | |||
int | formattingMode, | |||
const EncoderOptions * | encoderOptions = 0 | |||
) | [static] |
Format the specified object
to the specified output stream
using the specified formattingMode
and the optionally specified encoderOptions
and return a reference to stream
. The behavior is undefined unless the parameterized TYPE
and the formattingMode
combination is supported (supported combinations are listed in the component-level documentation).
static bsl::ostream& balxml::TypesPrintUtil::printBase64 | ( | bsl::ostream & | stream, | |
const TYPE & | object, | |||
const EncoderOptions * | encoderOptions = 0 | |||
) | [static] |
Format the specified object
to the specified output stream
using the bdlat_FormattingMode::e_BASE64
formatting mode and the optionally specified encoderOptions
. Return a reference to stream
.
static bsl::ostream& balxml::TypesPrintUtil::printDecimal | ( | bsl::ostream & | stream, | |
const TYPE & | object, | |||
const EncoderOptions * | encoderOptions = 0 | |||
) | [static] |
Format the specified object
to the specified output stream
using the bdlat_FormattingMode::e_DEC
formatting mode and the optionally specified encoderOptions
. Return a reference to stream
.
static bsl::ostream& balxml::TypesPrintUtil::printDefault | ( | bsl::ostream & | stream, | |
const TYPE & | object, | |||
const EncoderOptions * | encoderOptions = 0 | |||
) | [static] |
Format the specified object
to the specified output stream
using the bdlat_FormattingMode::e_DEFAULT
formatting mode and the optionally specified encoderOptions
. Return a reference to stream
.
static bsl::ostream& balxml::TypesPrintUtil::printHex | ( | bsl::ostream & | stream, | |
const TYPE & | object, | |||
const EncoderOptions * | encoderOptions = 0 | |||
) | [static] |
Format the specified object
to the specified output stream
using the bdlat_FormattingMode::e_HEX
formatting mode and the optionally specified encoderOptions
. Return a reference to stream
.
static bsl::ostream& balxml::TypesPrintUtil::printList | ( | bsl::ostream & | stream, | |
const TYPE & | object, | |||
const EncoderOptions * | encoderOptions = 0 | |||
) | [static] |
Format the specified object
to the specified output stream
using the bdlat_FormattingMode::e_LIST
formatting mode and the optionally specified encoderOptions
. Return a reference to stream
.
static bsl::ostream& balxml::TypesPrintUtil::printText | ( | bsl::ostream & | stream, | |
const TYPE & | object, | |||
const EncoderOptions * | encoderOptions = 0 | |||
) | [static] |
Format the specified object
to the specified output stream
using the bdlat_FormattingMode::e_TEXT
formatting mode and the optionally specified encoderOptions
. Return a reference to stream
. The string representation of object
must be a valid UTF-8 string and may not contain any control characters other than TAB, NL, and CR (i.e., no binary data) unless encoderOptions->allowControlCharacters()
is true
, in which control characters will be encoded as is. Upon detecting an invalid byte, the output stops and the failbit
is be set on the output stream
. In the case of an invalid byte in a multi-byte character, the output stops after the previous character and no byte in this character is output.