 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
15 #ifndef RAPIDJSON_PRETTYWRITER_H_
16 #define RAPIDJSON_PRETTYWRITER_H_
22 RAPIDJSON_DIAG_OFF(effc++)
25 #if defined(__clang__)
27 RAPIDJSON_DIAG_OFF(c++98-compat)
47 template<
typename OutputStream,
typename SourceEncoding = UTF8<>,
typename TargetEncoding = UTF8<>,
typename StackAllocator = CrtAllocator,
unsigned writeFlags = kWriteDefaultFlags>
48 class PrettyWriter :
public Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> {
65 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
76 RAPIDJSON_ASSERT(indentChar ==
' ' || indentChar ==
'\t' || indentChar ==
'\n' || indentChar ==
'\r');
117 #if RAPIDJSON_HAS_STDSTRING
118 bool String(
const std::basic_string<Ch>& str) {
131 #if RAPIDJSON_HAS_STDSTRING
132 bool Key(
const std::basic_string<Ch>& str) {
143 bool empty =
Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;
167 bool empty =
Base::level_stack_.template Pop<typename Base::Level>(1)->valueCount == 0;
269 #if defined(__clang__)
277 #endif // RAPIDJSON_RAPIDJSON_H_
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition: rapidjson.h:124
bool WriteRawValue(const Ch *json, size_t length)
Definition: writer.h:460
@ kNullType
null
Definition: rapidjson.h:730
bool EndArray(SizeType memberCount=0)
Definition: prettywriter.h:163
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition: rapidjson.h:121
bool WriteDouble(double d)
Definition: writer.h:349
bool String(const Ch *str, SizeType length, bool copy=false)
Definition: prettywriter.h:110
@ kFalseType
false
Definition: rapidjson.h:731
@ kArrayType
array
Definition: rapidjson.h:734
bool Int64(int64_t i64)
Definition: prettywriter.h:99
Type
Type of JSON value.
Definition: rapidjson.h:729
bool hasRoot_
Definition: writer.h:503
PrettyWriter & SetIndent(Ch indentChar, unsigned indentCharCount)
Set custom indentation.
Definition: prettywriter.h:75
Ch indentChar_
Definition: prettywriter.h:257
bool StartArray()
Definition: prettywriter.h:157
@ kObjectType
object
Definition: rapidjson.h:733
bool WriteEndArray()
Definition: writer.h:458
size_t valueCount
number of values in this level
Definition: writer.h:292
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause when started running for such interactive use in the most ordinary to print or display an announcement including an appropriate copyright notice and a notice that there is no and telling the user how to view a copy of this License These requirements apply to the modified work as a whole If identifiable sections of that work are not derived from the and can be reasonably considered independent and separate works in then this License and its do not apply to those sections when you distribute them as separate works mere aggregation of another work not based on the Font with the Font on a volume of a storage or distribution medium does not bring the other work under the scope of this License Condition Subsequent You may not copy
Definition: ARPHICPL.TXT:41
bool WriteUint64(uint64_t u64)
Definition: writer.h:340
bool StartObject()
Definition: prettywriter.h:123
bool WriteString(const Ch *str, SizeType length)
Definition: writer.h:377
@ kFormatSingleLineArray
Format arrays on a single line.
Definition: prettywriter.h:37
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:415
bool WriteUint(unsigned u)
Definition: writer.h:322
Blam::LinearAllocator allocator
– TO BE FILLED IN BY VERTIGO –
Definition: main.cpp:76
Writer< OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags > Base
Definition: prettywriter.h:50
@ kStringType
string
Definition: rapidjson.h:735
PrettyFormatOptions
Combination of PrettyWriter format flags.
Definition: prettywriter.h:35
unsigned long long uint64_t
Definition: stdint.h:18
bool WriteStartArray()
Definition: writer.h:457
JSON writer.
Definition: fwd.h:95
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:437
bool Null()
Definition: prettywriter.h:95
Writer with indentation and spacing.
Definition: fwd.h:100
bool WriteBool(bool b)
Definition: writer.h:301
@ kNumberType
number
Definition: rapidjson.h:736
bool Bool(bool b)
Definition: prettywriter.h:96
bool WriteInt64(int64_t i64)
Definition: writer.h:331
void WriteIndent()
Definition: prettywriter.h:252
bool WriteEndObject()
Definition: writer.h:456
PrettyWriter & SetFormatOptions(PrettyFormatOptions options)
Set pretty writer formatting options.
Definition: prettywriter.h:85
long long int64_t
Definition: stdint.h:14
size_t GetSize() const
Definition: stack.h:178
bool Uint64(uint64_t u64)
Definition: prettywriter.h:100
bool inArray
true if in array, otherwise in object
Definition: writer.h:293
internal::Stack< StackAllocator > level_stack_
Definition: writer.h:501
bool Int(int i)
Definition: prettywriter.h:97
void Flush()
Flush the output stream.
Definition: writer.h:282
PrettyWriter(OutputStream &os, StackAllocator *allocator=0, size_t levelDepth=Base::kDefaultLevelDepth)
Constructor.
Definition: prettywriter.h:58
OutputStream * os_
Definition: writer.h:500
bool Key(const Ch *str, SizeType length, bool copy=false)
Definition: prettywriter.h:129
bool Double(double d)
Definition: prettywriter.h:101
bool Key(const Ch *str)
Definition: prettywriter.h:188
bool Uint(unsigned u)
Definition: prettywriter.h:98
bool WriteStartObject()
Definition: writer.h:455
SourceEncoding::Ch Ch
Definition: writer.h:92
void PrettyPrefix(Type type)
Definition: prettywriter.h:208
@ kTrueType
true
Definition: rapidjson.h:732
bool String(const Ch *str)
Simpler but slower overload.
Definition: prettywriter.h:187
@ kFormatDefault
Default pretty formatting.
Definition: prettywriter.h:36
static const size_t kDefaultLevelDepth
Definition: writer.h:286
bool EndObject(SizeType memberCount=0)
Definition: prettywriter.h:137
bool WriteNull()
Definition: writer.h:296
bool RawValue(const Ch *json, size_t length, Type type)
Write a raw JSON value.
Definition: prettywriter.h:201
bool WriteInt(int i)
Definition: writer.h:313
unsigned indentCharCount_
Definition: prettywriter.h:258
Base::Ch Ch
Definition: prettywriter.h:51
Information for each nested level.
Definition: writer.h:290
PrettyFormatOptions formatOptions_
Definition: prettywriter.h:259
PrettyWriter(StackAllocator *allocator=0, size_t levelDepth=Base::kDefaultLevelDepth)
Definition: prettywriter.h:62
bool RawNumber(const Ch *str, SizeType length, bool copy=false)
Definition: prettywriter.h:103
void PutN(FileWriteStream &stream, char c, size_t n)
Implement specialized version of PutN() with memset() for better performance.
Definition: filewritestream.h:94
SizeType StrLen(const Ch *s)
Custom strlen() which works on different character types.
Definition: strfunc.h:31
bool EndValue(bool ret)
Definition: writer.h:494