TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
rapidjson.h File Reference

common definitions and configuration More...

#include <cstdlib>
#include <cstring>
#include <cassert>
#include "allocators.h"
#include "encodings.h"
+ Include dependency graph for rapidjson.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  StreamTraits< Stream >
 Provides additional information for stream. More...
 
struct  GenericStringStream< Encoding >
 Read-only string stream. More...
 
struct  StreamTraits< GenericStringStream< Encoding > >
 
struct  GenericInsituStringStream< Encoding >
 A read-write string stream. More...
 
struct  StreamTraits< GenericInsituStringStream< Encoding > >
 

Namespaces

 rapidjson
 main RapidJSON namespace
 

Macros

#define RAPIDJSON_MAJOR_VERSION   1
 Major version of RapidJSON in integer. More...
 
#define RAPIDJSON_MINOR_VERSION   0
 Minor version of RapidJSON in integer. More...
 
#define RAPIDJSON_PATCH_VERSION   2
 Patch version of RapidJSON in integer. More...
 
#define RAPIDJSON_VERSION_STRING   RAPIDJSON_STRINGIFY(RAPIDJSON_MAJOR_VERSION.RAPIDJSON_MINOR_VERSION.RAPIDJSON_PATCH_VERSION)
 Version of RapidJSON in "<major>.<minor>.<patch>" string format. More...
 
#define RAPIDJSON_NAMESPACE   rapidjson
 provide custom rapidjson namespace More...
 
#define RAPIDJSON_NAMESPACE_BEGIN   namespace RAPIDJSON_NAMESPACE {
 provide custom rapidjson namespace (opening expression) More...
 
#define RAPIDJSON_NAMESPACE_END   }
 provide custom rapidjson namespace (closing expression) More...
 
#define RAPIDJSON_LITTLEENDIAN   0
 Little endian machine. More...
 
#define RAPIDJSON_BIGENDIAN   1
 Big endian machine. More...
 
#define RAPIDJSON_64BIT   0
 Whether using 64-bit architecture. More...
 
#define RAPIDJSON_ALIGN(x)   ((x + 3u) & ~3u)
 Data alignment of the machine. More...
 
#define RAPIDJSON_UINT64_C2(high32, low32)   ((static_cast<uint64_t>(high32) << 32) | static_cast<uint64_t>(low32))
 Construct a 64-bit literal by a pair of 32-bit integer. More...
 
#define RAPIDJSON_ASSERT(x)   assert(x)
 Assertion. More...
 
#define RAPIDJSON_STATIC_ASSERT(x)
 (Internal) macro to check for conditions at compile-time More...
 
#define RAPIDJSON_NEW(x)   new x
 ! customization point for global new More...
 
#define RAPIDJSON_DELETE(x)   delete x
 ! customization point for global delete More...
 

Typedefs

typedef GenericStringStream
< UTF8<> > 
StringStream
 String stream with UTF8 encoding. More...
 
typedef
GenericInsituStringStream
< UTF8<> > 
InsituStringStream
 Insitu string stream with UTF8 encoding. More...
 

Enumerations

enum  Type {
  kNullType = 0, kFalseType = 1, kTrueType = 2, kObjectType = 3,
  kArrayType = 4, kStringType = 5, kNumberType = 6
}
 Type of JSON value. More...
 

Functions

template<typename Stream , typename Ch >
void PutN (Stream &stream, Ch c, size_t n)
 Put N copies of a character to a stream. More...
 

Variables

RAPIDJSON_NAMESPACE_BEGIN
typedef unsigned 
SizeType
 Size type (for string lengths, array sizes, etc.) More...
 

Detailed Description

common definitions and configuration

See also
RapidJSON configuration

Macro Definition Documentation

#define RAPIDJSON_64BIT   0

Whether using 64-bit architecture.

#define RAPIDJSON_BIGENDIAN   1

Big endian machine.

#define RAPIDJSON_DELETE (   x)    delete x

! customization point for global delete

#define RAPIDJSON_LITTLEENDIAN   0

Little endian machine.

#define RAPIDJSON_NEW (   x)    new x

! customization point for global new

#define RAPIDJSON_STATIC_ASSERT (   x)

(Internal) macro to check for conditions at compile-time

Parameters
xcompile-time condition
#define RAPIDJSON_UINT64_C2 (   high32,
  low32 
)    ((static_cast<uint64_t>(high32) << 32) | static_cast<uint64_t>(low32))

Construct a 64-bit literal by a pair of 32-bit integer.

64-bit literal with or without ULL suffix is prone to compiler warnings. UINT64_C() is C macro which cause compilation problems. Use this macro to define 64-bit constants by a pair of 32-bit integer.

Typedef Documentation

Insitu string stream with UTF8 encoding.

String stream with UTF8 encoding.

Enumeration Type Documentation

enum Type

Type of JSON value.

Enumerator
kNullType 

null

kFalseType 

false

kTrueType 

true

kObjectType 

object

kArrayType 

array

kStringType 

string

kNumberType 

number

642  {
643  kNullType = 0,
644  kFalseType = 1,
645  kTrueType = 2,
646  kObjectType = 3,
647  kArrayType = 4,
648  kStringType = 5,
649  kNumberType = 6
650 };
object
Definition: rapidjson.h:646
array
Definition: rapidjson.h:647
false
Definition: rapidjson.h:644
string
Definition: rapidjson.h:648
number
Definition: rapidjson.h:649
true
Definition: rapidjson.h:645
null
Definition: rapidjson.h:643

Function Documentation

template<typename Stream , typename Ch >
void PutN ( Stream &  stream,
Ch  c,
size_t  n 
)
inline

Put N copies of a character to a stream.

559  {
560  for (size_t i = 0; i < n; i++)
561  stream.Put(c);
562 }

Variable Documentation

RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType

Size type (for string lengths, array sizes, etc.)

RapidJSON uses 32-bit array/string indices even on 64-bit platforms, instead of using size_t. Users may override the SizeType by defining RAPIDJSON_NO_SIZETYPEDEFINE.