|
| PrettyWriter (Stream &stream, int precision=20, Allocator *allocator=0, size_t levelDepth=Base::kDefaultLevelDepth) |
| Constructor. More...
|
|
PrettyWriter & | SetIndent (Ch indentChar, unsigned indentCharCount) |
| Set custom indentation. More...
|
|
PrettyWriter & | Null_ () |
|
PrettyWriter & | Bool_ (bool b) |
|
PrettyWriter & | Int (int i) |
|
PrettyWriter & | Uint (unsigned u) |
|
PrettyWriter & | Int64 (int64_t i64) |
|
PrettyWriter & | Uint64 (uint64_t u64) |
|
PrettyWriter & | Double (double d) |
|
PrettyWriter & | String (const Ch *str, SizeType length, bool copy=false) |
|
PrettyWriter & | StartObject () |
|
PrettyWriter & | EndObject (SizeType memberCount=0) |
|
PrettyWriter & | StartArray () |
|
PrettyWriter & | EndArray (SizeType memberCount=0) |
|
PrettyWriter & | String (const Ch *str) |
| Simpler but slower overload. More...
|
|
| Writer (Stream &stream, int precision=20, MemoryPoolAllocator<> *allocator=0, size_t levelDepth=kDefaultLevelDepth) |
|
Writer & | Null_ () |
|
Writer & | Bool_ (bool b) |
|
Writer & | Int (int i) |
|
Writer & | Uint (unsigned u) |
|
Writer & | Int64 (int64_t i64) |
|
Writer & | Uint64 (uint64_t u64) |
|
Writer & | Double (double d) |
|
Writer & | LongDouble (long double d) |
|
Writer & | LongLong (long long d) |
|
Writer & | ULongLong (unsigned long long d) |
|
Writer & | String (const Ch *str, SizeType length, bool copy=false) |
|
Writer & | String (const Ch *str) |
| Simpler but slower overload. More...
|
|
Writer & | StartObject () |
|
Writer & | EndObject (SizeType memberCount=0) |
|
Writer & | StartArray () |
|
Writer & | EndArray (SizeType elementCount=0) |
|
template<typename Stream, typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
class rapidjson::PrettyWriter< Stream, Encoding, Allocator >
Writer with indentation and spacing.
- Template Parameters
-
Stream | Type of ouptut stream. |
Encoding | Encoding of both source strings and output. |
Allocator | Type of allocator for allocating memory of stack. |
template<typename Stream , typename Encoding = UTF8<>, typename Allocator = MemoryPoolAllocator<>>
134 typename Base::Level* level =
Base::level_stack_.template Top<typename Base::Level>();
136 if (level->inArray) {
137 if (level->valueCount > 0) {
146 if (level->valueCount > 0) {
147 if (level->valueCount % 2 == 0) {
159 if (level->valueCount % 2 == 0)
162 if (!level->inArray && level->valueCount % 2 == 0)
@ kArrayType
array
Definition: rapidjson.h:543
@ kObjectType
object
Definition: rapidjson.h:542
@ kStringType
string
Definition: rapidjson.h:544
References rapidjson::Writer< Stream, Encoding, Allocator >::Level::inArray, rapidjson::kArrayType, rapidjson::kObjectType, rapidjson::kStringType, rapidjson::Writer< Stream, Encoding, Allocator >::level_stack_, RAPIDJSON_ASSERT, rapidjson::Writer< Stream, Encoding, Allocator >::stream_, rapidjson::Writer< Stream, Encoding, Allocator >::Level::valueCount, and rapidjson::PrettyWriter< Stream, Encoding, Allocator >::WriteIndent().
Referenced by rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Bool_(), rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Double(), rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Int(), rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Int64(), rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Null_(), rapidjson::PrettyWriter< Stream, Encoding, Allocator >::StartArray(), rapidjson::PrettyWriter< Stream, Encoding, Allocator >::StartObject(), rapidjson::PrettyWriter< Stream, Encoding, Allocator >::String(), rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Uint(), and rapidjson::PrettyWriter< Stream, Encoding, Allocator >::Uint64().