common definitions and configuration More...
#include <cstdlib>#include <cstring>#include <cassert>Go to the source code of this file.
Namespaces | |
| namespace | rapidjson |
| main RapidJSON namespace | |
Macros | |
| #define | RAPIDJSON_MAJOR_VERSION 1 |
| Major version of RapidJSON in integer. | |
| #define | RAPIDJSON_MINOR_VERSION 1 |
| Minor version of RapidJSON in integer. | |
| #define | RAPIDJSON_PATCH_VERSION 0 |
| Patch version of RapidJSON in integer. | |
| #define | RAPIDJSON_VERSION_STRING RAPIDJSON_STRINGIFY(RAPIDJSON_MAJOR_VERSION.RAPIDJSON_MINOR_VERSION.RAPIDJSON_PATCH_VERSION) |
| Version of RapidJSON in "<major>.<minor>.<patch>" string format. | |
| #define | RAPIDJSON_NAMESPACE rapidjson |
| provide custom rapidjson namespace | |
| #define | RAPIDJSON_NAMESPACE_BEGIN namespace RAPIDJSON_NAMESPACE { |
| provide custom rapidjson namespace (opening expression) | |
| #define | RAPIDJSON_NAMESPACE_END } |
| provide custom rapidjson namespace (closing expression) | |
| #define | RAPIDJSON_HAS_STDSTRING |
Enable RapidJSON support for std::string. | |
| #define | RAPIDJSON_USE_MEMBERSMAP |
Enable RapidJSON support for object members handling in a std::multimap. | |
| #define | RAPIDJSON_LITTLEENDIAN 0 |
| Little endian machine. | |
| #define | RAPIDJSON_BIGENDIAN 1 |
| Big endian machine. | |
| #define | RAPIDJSON_64BIT 0 |
| Whether using 64-bit architecture. | |
| #define | RAPIDJSON_ALIGN(x) |
| Data alignment of the machine. | |
| #define | RAPIDJSON_UINT64_C2(high32, low32) |
| Construct a 64-bit literal by a pair of 32-bit integer. | |
| #define | RAPIDJSON_48BITPOINTER_OPTIMIZATION 0 |
| Use only lower 48-bit address for some pointers. | |
| #define | RAPIDJSON_SETPOINTER(type, p, x) |
| #define | RAPIDJSON_GETPOINTER(type, p) |
| #define | RAPIDJSON_ASSERT(x) |
| Assertion. | |
| #define | RAPIDJSON_STATIC_ASSERT(x) |
| (Internal) macro to check for conditions at compile-time | |
| #define | RAPIDJSON_LIKELY(x) |
| Compiler branching hint for expression with high probability to be true. | |
| #define | RAPIDJSON_UNLIKELY(x) |
| Compiler branching hint for expression with low probability to be true. | |
| #define | RAPIDJSON_NOEXCEPT_ASSERT(x) |
| Assertion (in non-throwing contexts). | |
| #define | RAPIDJSON_MALLOC(size) |
! customization point for global malloc | |
| #define | RAPIDJSON_REALLOC(ptr, new_size) |
! customization point for global realloc | |
| #define | RAPIDJSON_FREE(ptr) |
! customization point for global free | |
| #define | RAPIDJSON_NEW(TypeName) |
! customization point for global new | |
| #define | RAPIDJSON_DELETE(x) |
! customization point for global delete | |
Enumerations | |
| enum | Type { kNullType = 0 , kFalseType = 1 , kTrueType = 2 , kObjectType = 3 , kArrayType = 4 , kStringType = 5 , kNumberType = 6 } |
| Type of JSON value. More... | |
Variables | |
| RAPIDJSON_NAMESPACE_BEGIN typedef unsigned | SizeType |
| Size type (for string lengths, array sizes, etc.). | |
common definitions and configuration
Definition in file rapidjson.h.
| #define RAPIDJSON_64BIT 0 |
Whether using 64-bit architecture.
Definition at line 293 of file rapidjson.h.
| #define RAPIDJSON_BIGENDIAN 1 |
Big endian machine.
Definition at line 231 of file rapidjson.h.
| #define RAPIDJSON_DELETE | ( | x | ) |
! customization point for global delete
Definition at line 717 of file rapidjson.h.
Referenced by GenericPointer< Value, CrtAllocator >::~GenericPointer(), GenericSchemaDocument< Value, CrtAllocator >::~GenericSchemaDocument(), GenericSchemaValidator< SchemaDocument, BaseReaderHandler< UTF8< char >, void >, CrtAllocator >::~GenericSchemaValidator(), GenericUri< ValueType, Allocator >::~GenericUri(), and MemoryPoolAllocator< BaseAllocator >::~MemoryPoolAllocator().
| #define RAPIDJSON_FREE | ( | ptr | ) |
! customization point for global free
Definition at line 705 of file rapidjson.h.
| #define RAPIDJSON_GETPOINTER | ( | type, | |
| p ) |
Definition at line 351 of file rapidjson.h.
| #define RAPIDJSON_LITTLEENDIAN 0 |
Little endian machine.
Definition at line 230 of file rapidjson.h.
| #define RAPIDJSON_MALLOC | ( | size | ) |
! customization point for global malloc
Definition at line 697 of file rapidjson.h.
| #define RAPIDJSON_NEW | ( | TypeName | ) |
! customization point for global new
Definition at line 713 of file rapidjson.h.
Referenced by MemoryPoolAllocator< BaseAllocator >::AddChunk(), GenericDocument< UTF8<> >::GenericDocument(), GenericDocument< UTF8<> >::GenericDocument(), GenericSchemaDocument< Value, CrtAllocator >::GenericSchemaDocument(), and MemoryPoolAllocator< BaseAllocator >::MemoryPoolAllocator().
| #define RAPIDJSON_REALLOC | ( | ptr, | |
| new_size ) |
! customization point for global realloc
Definition at line 701 of file rapidjson.h.
| #define RAPIDJSON_SETPOINTER | ( | type, | |
| p, | |||
| x ) |
Definition at line 350 of file rapidjson.h.
| #define RAPIDJSON_STATIC_ASSERT | ( | x | ) |
(Internal) macro to check for conditions at compile-time
| x | compile-time condition |
Definition at line 477 of file rapidjson.h.
Referenced by GenericValue< Encoding, Allocator >::GenericValue().
| #define RAPIDJSON_UINT64_C2 | ( | high32, | |
| 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.
Definition at line 321 of file rapidjson.h.
Referenced by GenericValue< Encoding, Allocator >::GenericValue(), and GenericValue< Encoding, Allocator >::GenericValue().
| enum Type |
Type of JSON value.
| Enumerator | |
|---|---|
| kNullType | null |
| kFalseType | false |
| kTrueType | true |
| kObjectType | object |
| kArrayType | array |
| kStringType | string |
| kNumberType | number |
Definition at line 730 of file rapidjson.h.
| 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.
Definition at line 416 of file rapidjson.h.
Referenced by GenericPointer< Value, CrtAllocator >::Append(), GenericSchemaDocument< Value, CrtAllocator >::FindId(), GenericSchemaDocument< Value, CrtAllocator >::GenericSchemaDocument(), GenericStringRef< Ch >::GenericStringRef(), GenericValue< Encoding, Allocator >::GenericValue(), GenericValue< Encoding, Allocator >::GenericValue(), GenericValue< Encoding, Allocator >::GenericValue(), BaseReaderHandler< Encoding, Derived >::RawNumber(), GenericSchemaDocument< Value, CrtAllocator >::SchemaErrorPointer(), GenericSchemaDocument< Value, CrtAllocator >::SchemaErrorValue(), GenericValue< Encoding, Allocator >::SetObjectRaw(), and GenericStringRef< Ch >::StringRef().