8#ifndef INCLUDED_BALXML_FORMATTER_PRETTYIMPL
9#define INCLUDED_BALXML_FORMATTER_PRETTYIMPL
62#include <balscm_version.h>
78#include <bsl_ostream.h>
79#include <bsl_string_view.h>
80#include <bsl_vector.h>
242 int d_spacesPerLevel;
336 const int&
column()
const;
380 k_VALUE_STRING_BUFFER_SIZE = 256,
382 k_INFINITE_WRAP_COLUMN = 0
403 static void addAttributeImpl(bsl::ostream& stream,
413 static void addCommentImpl(bsl::ostream& stream,
419 static void addCommentOnNewLineImpl(bsl::ostream& stream,
430 static void addDataImpl(bsl::ostream& stream,
453 static void addListDataImpl(bsl::ostream& stream,
480 template <
class VALUE_TYPE>
482 bsl::ostream& stream,
485 const VALUE_TYPE& value,
486 int formattingMode = 0,
508 bsl::ostream& stream,
511 bool forceNewline =
true);
534 template <
class VALUE_TYPE>
536 bsl::ostream& stream,
538 const VALUE_TYPE& value,
539 int formattingMode = 0,
549 template <
class TYPE>
551 bsl::ostream& stream,
555 int formattingMode = 0,
589 template <
class VALUE_TYPE>
591 bsl::ostream& stream,
593 const VALUE_TYPE& value,
594 int formattingMode = 0,
618 bsl::ostream& stream,
621 bool forceNewline =
true,
622 bool omitEnclosingWhitespace =
false);
642 static bsl::ostream&
flush(bsl::ostream& stream,
State *state);
676: d_id(
Id::e_AT_START)
688: d_id(
Id::e_AT_START)
693, d_elementNesting(allocator)
702, d_indentLevel(original.d_indentLevel)
703, d_spacesPerLevel(original.d_spacesPerLevel)
704, d_column(original.d_column)
705, d_wrapColumn(original.d_wrapColumn)
706, d_elementNesting(original.d_elementNesting, allocator)
716: d_id(
Id::e_AT_START)
717, d_indentLevel(indentLevel)
718, d_spacesPerLevel(spacesPerLevel)
720, d_wrapColumn(wrapColumn)
721, d_elementNesting(allocator)
735, d_indentLevel(indentLevel)
736, d_spacesPerLevel(spacesPerLevel)
738, d_wrapColumn(wrapColumn)
739, d_elementNesting(elementNesting, allocator)
754 return d_elementNesting;
766 return d_indentLevel;
772 return d_spacesPerLevel;
792 return d_elementNesting;
811 return d_indentLevel;
817 return d_spacesPerLevel;
831template <
class VALUE_TYPE>
833 bsl::ostream& stream,
836 const VALUE_TYPE& value,
842 bsl::ostream ss(&sb);
846 stream.setstate(bsl::ios_base::failbit);
852 addAttributeImpl(stream, state, name, valueString);
858template <
class VALUE_TYPE>
860 bsl::ostream& stream,
862 const VALUE_TYPE& valueData,
868 bsl::ostream ss(&sb);
872 stream.setstate(bsl::ios_base::failbit);
877 addDataImpl(stream, state, valueString);
883 bsl::ostream& stream,
891 addData(stream, state, value, formattingMode, encoderOptions);
896template <
class VALUE_TYPE>
898 bsl::ostream& stream,
900 const VALUE_TYPE& value,
906 bsl::ostream ss(&sb);
910 stream.setstate(bsl::ios_base::failbit);
915 addListDataImpl(stream, state, valueString);
Definition balxml_encoderoptions.h:88
Definition bdlma_localsequentialallocator.h:230
Definition bdlsb_memoutstreambuf.h:212
bsl::size_t length() const
Return the number of valid characters in this stream buffer.
Definition bdlsb_memoutstreambuf.h:400
const char * data() const
Definition bdlsb_memoutstreambuf.h:394
Definition bslma_bslallocator.h:580
Definition bslstl_stringview.h:441
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this vector.
Definition bslstl_vector.h:2664
Definition bslstl_vector.h:1025
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:4019
void swap(vector &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:1712
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balxml_base64parser.h:150
static bsl::ostream & print(bsl::ostream &stream, const TYPE &object, int formattingMode, const EncoderOptions *encoderOptions=0)
Definition balxml_typesprintutil.h:1161
Definition bslma_usesbslmaallocator.h:343