1 #ifndef RAPIDJSON_PRETTYWRITER_H_
2 #define RAPIDJSON_PRETTYWRITER_H_
14 template<
typename Stream,
typename Encoding = UTF8<>,
typename Allocator = MemoryPoolAllocator<> >
34 RAPIDJSON_ASSERT(indentChar ==
' ' || indentChar ==
'\t' || indentChar ==
'\n' || indentChar ==
'\r');
69 bool empty =
Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;
90 bool empty =
Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;
156 #endif // RAPIDJSON_RAPIDJSON_H_
internal::Stack< Allocator > level_stack_
PrettyWriter & StartObject()
bool inArray
true if in array, otherwise in object
SizeType StrLen(const Ch *s)
Custom strlen() which works on different character types.
unsigned SizeType
Use 32-bit array/string indices even for 64-bit platform, instead of using size_t.
PrettyWriter & StartArray()
PrettyWriter & EndObject(SizeType memberCount=0)
void WriteUint64(uint64_t u64)
Writer with indentation and spacing.
void WriteInt64(int64_t i64)
PrettyWriter & Int(int i)
void WriteString(const Ch *str, SizeType length)
void WriteUint(unsigned u)
Information for each nested level.
PrettyWriter & SetIndent(Ch indentChar, unsigned indentCharCount)
Set custom indentation.
Writer< Stream, Encoding, Allocator > Base
#define RAPIDJSON_ASSERT(x)
Assertion.
size_t valueCount
number of values in this level
unsigned indentCharCount_
static const size_t kDefaultLevelDepth
PrettyWriter & Int64(int64_t i64)
PrettyWriter & Bool(bool b)
Concept for reading and writing characters.
PrettyWriter & String(const Ch *str, SizeType length, bool copy=false)
void WriteDouble(double d)
PrettyWriter & Double(double d)
double double double *typedef void(CALLCONV AGdll_TYPE)(double *
PrettyWriter & String(const Ch *str)
Simpler but slower overload.
PrettyWriter & Uint64(uint64_t u64)
Concept for allocating, resizing and freeing memory block.
PrettyWriter(Stream &stream, Allocator *allocator=0, size_t levelDepth=Base::kDefaultLevelDepth)
Constructor.
PrettyWriter & Uint(unsigned u)
void PrettyPrefix(Type type)
PrettyWriter & EndArray(SizeType memberCount=0)
void PutN(Stream &stream, Ch c, size_t n)
Put N copies of a character to a stream.