 |
Blamite Game Engine - blam!
00368.02.12.23.1347.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
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
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
unsigned __int64 uint64_t
Definition: stdint.h:136
@ 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
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
signed __int64 int64_t
Definition: stdint.h:135
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
The original diffuse textures are from the NVIDIA texture with other maps generated from them by Steve Streeting The following license applies to all textures Single Product or Project Use of NVSDK Art Imagery THIS IS A LEGAL immediately delete the NVSDK Art Imagery from your hard disk If you proceed to use any of the you thereby signify that you have agreed to all of the terms and conditions set forth below You may not copy
Definition: TextureUsageAgreement.txt:6
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
Detailed options
Definition: README.txt:27
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