NDDEM
Namespaces | Macros | Enumerations | Variables
rapidjson.h File Reference

common definitions and configuration More...

#include <cstdlib>
#include <cstring>
#include <cassert>

Go to the source code of this file.

Namespaces

 rapidjson
 main RapidJSON namespace
 

Macros

#define CEREAL_RAPIDJSON_MAJOR_VERSION   1
 Major version of RapidJSON in integer. More...
 
#define CEREAL_RAPIDJSON_MINOR_VERSION   1
 Minor version of RapidJSON in integer. More...
 
#define CEREAL_RAPIDJSON_PATCH_VERSION   0
 Patch version of RapidJSON in integer. More...
 
#define CEREAL_RAPIDJSON_VERSION_STRING    CEREAL_RAPIDJSON_STRINGIFY(CEREAL_RAPIDJSON_MAJOR_VERSION.CEREAL_RAPIDJSON_MINOR_VERSION.CEREAL_RAPIDJSON_PATCH_VERSION)
 Version of RapidJSON in "<major>.<minor>.<patch>" string format. More...
 
#define CEREAL_RAPIDJSON_NAMESPACE   rapidjson
 provide custom rapidjson namespace More...
 
#define CEREAL_RAPIDJSON_NAMESPACE_BEGIN   namespace CEREAL_RAPIDJSON_NAMESPACE {
 provide custom rapidjson namespace (opening expression) More...
 
#define CEREAL_RAPIDJSON_NAMESPACE_END   }
 provide custom rapidjson namespace (closing expression) More...
 
#define CEREAL_RAPIDJSON_HAS_STDSTRING
 Enable RapidJSON support for std::string. More...
 
#define CEREAL_RAPIDJSON_LITTLEENDIAN   0
 Little endian machine. More...
 
#define CEREAL_RAPIDJSON_BIGENDIAN   1
 Big endian machine. More...
 
#define CEREAL_RAPIDJSON_64BIT   0
 Whether using 64-bit architecture. More...
 
#define CEREAL_RAPIDJSON_ALIGN(x)   (((x) + static_cast<size_t>(7u)) & ~static_cast<size_t>(7u))
 Data alignment of the machine. More...
 
#define CEREAL_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 CEREAL_RAPIDJSON_48BITPOINTER_OPTIMIZATION   0
 Use only lower 48-bit address for some pointers. More...
 
#define CEREAL_RAPIDJSON_SETPOINTER(type, p, x)   (p = (x))
 
#define CEREAL_RAPIDJSON_GETPOINTER(type, p)   (p)
 
#define CEREAL_RAPIDJSON_ASSERT(x)   assert(x)
 Assertion. More...
 
#define CEREAL_RAPIDJSON_STATIC_ASSERT(x)
 (Internal) macro to check for conditions at compile-time More...
 
#define CEREAL_RAPIDJSON_LIKELY(x)   (x)
 Compiler branching hint for expression with high probability to be true. More...
 
#define CEREAL_RAPIDJSON_UNLIKELY(x)   (x)
 Compiler branching hint for expression with low probability to be true. More...
 
#define CEREAL_RAPIDJSON_NOEXCEPT_ASSERT(x)   CEREAL_RAPIDJSON_ASSERT(x)
 Assertion (in non-throwing contexts). More...
 
#define CEREAL_RAPIDJSON_NEW(TypeName)   new TypeName
 ! customization point for global new More...
 
#define CEREAL_RAPIDJSON_DELETE(x)   delete x
 ! customization point for global delete More...
 

Enumerations

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

Variables

CEREAL_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

◆ CEREAL_RAPIDJSON_64BIT

#define CEREAL_RAPIDJSON_64BIT   0

Whether using 64-bit architecture.

◆ CEREAL_RAPIDJSON_BIGENDIAN

#define CEREAL_RAPIDJSON_BIGENDIAN   1

Big endian machine.

◆ CEREAL_RAPIDJSON_DELETE

#define CEREAL_RAPIDJSON_DELETE (   x)    delete x

! customization point for global delete

◆ CEREAL_RAPIDJSON_GETPOINTER

#define CEREAL_RAPIDJSON_GETPOINTER (   type,
 
)    (p)

◆ CEREAL_RAPIDJSON_LITTLEENDIAN

#define CEREAL_RAPIDJSON_LITTLEENDIAN   0

Little endian machine.

◆ CEREAL_RAPIDJSON_NEW

#define CEREAL_RAPIDJSON_NEW (   TypeName)    new TypeName

! customization point for global new

◆ CEREAL_RAPIDJSON_SETPOINTER

#define CEREAL_RAPIDJSON_SETPOINTER (   type,
  p,
 
)    (p = (x))

◆ CEREAL_RAPIDJSON_STATIC_ASSERT

#define CEREAL_RAPIDJSON_STATIC_ASSERT (   x)

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

Parameters
xcompile-time condition

◆ CEREAL_RAPIDJSON_UINT64_C2

#define CEREAL_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.

Enumeration Type Documentation

◆ Type

enum Type

Type of JSON value.

Enumerator
kNullType 

null

kFalseType 

false

kTrueType 

true

kObjectType 

object

kArrayType 

array

kStringType 

string

kNumberType 

number

Variable Documentation

◆ SizeType

CEREAL_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 CEREAL_RAPIDJSON_NO_SIZETYPEDEFINE.