8#ifndef INCLUDED_BALXML_FORMATTER
9#define INCLUDED_BALXML_FORMATTER
281#include <balscm_version.h>
300#include <bsl_optional.h>
301#include <bsl_ostream.h>
302#include <bsl_streambuf.h>
303#include <bsl_string.h>
335 bsl::ostream *d_stream_p;
362 const bsl::ostream *
stream()
const;
403 enum { k_COMPACT_MODE_WRAP_COLUMN = -1 };
446 const Compact& compact()
const;
455 const Pretty& pretty()
const;
522#pragma bde_verify push
523#pragma bde_verify -MN03
524#pragma bde_verify -UC01
550#pragma bde_verify pop
627 template <
class TYPE>
630 int formattingMode = 0);
666 template <
class TYPE>
667 void addData(
const TYPE& value,
int formattingMode = 0);
673 template <
class TYPE>
676 int formattingMode = 0);
702 template <
class TYPE>
703 void addListData(
const TYPE& value,
int formattingMode = 0);
725 bool forceNewline =
true,
726 bool omitEnclosingWhitespace =
false);
798Formatter_StreamHolder::Formatter_StreamHolder(bsl::streambuf *streamBuffer)
799: d_ownStream(
bsl::in_place_t(), streamBuffer)
800, d_stream_p(&d_ownStream.value())
805Formatter_StreamHolder::Formatter_StreamHolder(bsl::ostream *stream)
839Formatter_PrettyImplState& Formatter_State::pretty()
848const Formatter_CompactImplState& Formatter_State::compact()
const
862const Formatter_PrettyImplState& Formatter_State::pretty()
const
872: d_mode(
Mode::e_COMPACT)
880: d_mode(
Mode::e_COMPACT)
881, d_allocator(allocator)
903 switch (d_state.mode()) {
926 switch (d_state.mode()) {
940 switch (d_state.mode()) {
963 switch (d_state.mode()) {
986 switch (d_state.mode()) {
1007 switch (d_state.mode()) {
1020 switch (d_state.mode()) {
1033 switch (d_state.mode()) {
1042 return *d_streamHolder.
stream();
1049 return d_encoderOptions;
1057 switch (d_state.mode()) {
1074 switch (d_state.mode()) {
1076 result = d_state.compact().
column();
1079 result = d_state.pretty().
column();
1091 switch (d_state.mode()) {
1106 return d_streamHolder.
stream()->good() ? 0 : -1;
1114 switch (d_state.mode()) {
1116 result = State::k_COMPACT_MODE_WRAP_COLUMN;
Definition balxml_encoderoptions.h:88
Definition bslma_bslallocator.h:580
Definition bslstl_stringview.h:441
Definition bslstl_optional.h:1861
Definition bslma_allocator.h:457
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_DELETED
Definition bsls_keyword.h:609
Definition balxml_base64parser.h:150
Definition bdlb_printmethods.h:283
Definition bslma_usesbslmaallocator.h:343
Definition bsls_objectbuffer.h:276