bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
|
A document for parsing JSON text as DOM. More...
#include <document.h>
Public Types | |
typedef Allocator | AllocatorType |
Allocator type from template parameter. | |
typedef GenericArray< false, ValueType > | Array |
typedef Encoding::Ch | Ch |
Character type derived from Encoding. | |
typedef GenericArray< true, ValueType > | ConstArray |
typedef GenericMemberIterator< true, Encoding, RAPIDJSON_DEFAULT_ALLOCATOR >::Iterator | ConstMemberIterator |
Constant member iterator for iterating in object. | |
typedef GenericObject< true, ValueType > | ConstObject |
typedef const GenericValue * | ConstValueIterator |
Constant value iterator for iterating in array. | |
typedef Encoding | EncodingType |
Encoding type from template parameter. | |
typedef GenericMember< Encoding, RAPIDJSON_DEFAULT_ALLOCATOR > | Member |
Name-value pair in an object. | |
typedef GenericMemberIterator< false, Encoding, RAPIDJSON_DEFAULT_ALLOCATOR >::Iterator | MemberIterator |
Member iterator for iterating in object. | |
typedef GenericObject< false, ValueType > | Object |
typedef GenericStringRef< Ch > | StringRefType |
Reference to a constant string. | |
typedef GenericValue * | ValueIterator |
Value iterator for iterating in array. | |
typedef GenericValue< Encoding, Allocator > | ValueType |
Value type of the document. | |
Public Member Functions | |
bool | Bool (bool b) |
bool | Double (double d) |
bool | EndArray (SizeType elementCount) |
bool | EndObject (SizeType memberCount) |
GenericDocument (Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0) | |
Constructor. | |
GenericDocument (Type type, Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0) | |
Constructor. | |
Allocator & | GetAllocator () |
Get the allocator of this document. | |
size_t | GetStackCapacity () const |
Get the capacity of stack in bytes. | |
bool | Int (int i) |
bool | Int64 (int64_t i) |
bool | Key (const Ch *str, SizeType length, bool copy) |
bool | Null () |
template<typename Generator> | |
GenericDocument & | Populate (Generator &g) |
Populate this document by a generator which produces SAX events. | |
bool | RawNumber (const Ch *str, SizeType length, bool copy) |
bool | StartArray () |
bool | StartObject () |
bool | String (const Ch *str, SizeType length, bool copy) |
GenericDocument & | Swap (GenericDocument &rhs) RAPIDJSON_NOEXCEPT |
Exchange the contents of this document with those of another. | |
bool | Uint (unsigned i) |
bool | Uint64 (uint64_t i) |
Parse from stream | |
template<unsigned parseFlags, typename SourceEncoding, typename InputStream> | |
GenericDocument & | ParseStream (InputStream &is) |
Parse JSON text from an input stream (with Encoding conversion) | |
template<unsigned parseFlags, typename InputStream> | |
GenericDocument & | ParseStream (InputStream &is) |
Parse JSON text from an input stream. | |
template<typename InputStream> | |
GenericDocument & | ParseStream (InputStream &is) |
Parse JSON text from an input stream (with kParseDefaultFlags) | |
Parse in-place from mutable string | |
template<unsigned parseFlags> | |
GenericDocument & | ParseInsitu (Ch *str) |
Parse JSON text from a mutable string. | |
GenericDocument & | ParseInsitu (Ch *str) |
Parse JSON text from a mutable string (with kParseDefaultFlags) | |
Parse from read-only string | |
template<unsigned parseFlags, typename SourceEncoding> | |
GenericDocument & | Parse (const typename SourceEncoding::Ch *str) |
Parse JSON text from a read-only string (with Encoding conversion) | |
template<unsigned parseFlags> | |
GenericDocument & | Parse (const Ch *str) |
Parse JSON text from a read-only string. | |
GenericDocument & | Parse (const Ch *str) |
Parse JSON text from a read-only string (with kParseDefaultFlags) | |
template<unsigned parseFlags, typename SourceEncoding> | |
GenericDocument & | Parse (const typename SourceEncoding::Ch *str, size_t length) |
template<unsigned parseFlags> | |
GenericDocument & | Parse (const Ch *str, size_t length) |
GenericDocument & | Parse (const Ch *str, size_t length) |
Handling parse errors | |
bool | HasParseError () const |
Whether a parse error has occurred in the last parsing. | |
ParseErrorCode | GetParseError () const |
Get the ParseErrorCode of last parsing. | |
size_t | GetErrorOffset () const |
Get the position of last parsing error in input, 0 otherwise. | |
operator ParseResult () const | |
Implicit conversion to get the last parse result. | |
Friends | |
template<typename, typename> | |
class | GenericValue |
void | swap (GenericDocument &a, GenericDocument &b) RAPIDJSON_NOEXCEPT |
free-standing swap function helper | |
Assignment operators | |
enum | |
RAPIDJSON_DISABLEIF_RETURN ((internal::IsPointer< T >),(GenericValue &)) operator | |
Assignment with primitive types. | |
RAPIDJSON_FORCEINLINE const Ch * | GetStringPointer () const |
RAPIDJSON_FORCEINLINE const Ch * | SetStringPointer (const Ch *str) |
RAPIDJSON_FORCEINLINE GenericValue * | GetElementsPointer () const |
RAPIDJSON_FORCEINLINE GenericValue * | SetElementsPointer (GenericValue *elements) |
RAPIDJSON_FORCEINLINE Member * | GetMembersPointer () const |
RAPIDJSON_FORCEINLINE Member * | SetMembersPointer (Member *members) |
void | SetArrayRaw (GenericValue *values, SizeType count, RAPIDJSON_DEFAULT_ALLOCATOR &allocator) |
void | SetObjectRaw (Member *members, SizeType count, RAPIDJSON_DEFAULT_ALLOCATOR &allocator) |
Initialize this value as object with initial data, without calling destructor. | |
void | SetStringRaw (StringRefType s) RAPIDJSON_NOEXCEPT |
Initialize this value as constant string, without calling destructor. | |
void | SetStringRaw (StringRefType s, RAPIDJSON_DEFAULT_ALLOCATOR &allocator) |
Initialize this value as copy string with initial data, without calling destructor. | |
void | RawAssign (GenericValue &rhs) RAPIDJSON_NOEXCEPT |
Assignment without calling destructor. | |
bool | StringEqual (const GenericValue< Encoding, SourceAllocator > &rhs) const |
static const SizeType | kDefaultArrayCapacity |
static const SizeType | kDefaultObjectCapacity |
Data | data_ |
A document for parsing JSON text as DOM.
Encoding | Encoding for both parsing and string storage. |
Allocator | Allocator for allocating memory for the DOM |
StackAllocator | Allocator for allocating memory for stack during parsing. |
delete
a GenericDocument object via a pointer to a GenericValue. Definition at line 2203 of file document.h.
typedef Allocator GenericDocument< Encoding, Allocator, StackAllocator >::AllocatorType |
Allocator type from template parameter.
Definition at line 2207 of file document.h.
|
inherited |
Definition at line 670 of file document.h.
typedef Encoding::Ch GenericDocument< Encoding, Allocator, StackAllocator >::Ch |
Character type derived from Encoding.
Definition at line 2205 of file document.h.
|
inherited |
Definition at line 671 of file document.h.
|
inherited |
Constant member iterator for iterating in object.
Definition at line 666 of file document.h.
|
inherited |
Definition at line 673 of file document.h.
|
inherited |
Constant value iterator for iterating in array.
Definition at line 668 of file document.h.
|
inherited |
Encoding type from template parameter.
Definition at line 661 of file document.h.
|
inherited |
Name-value pair in an object.
Definition at line 660 of file document.h.
|
inherited |
Member iterator for iterating in object.
Definition at line 665 of file document.h.
|
inherited |
Definition at line 672 of file document.h.
|
inherited |
Reference to a constant string.
Definition at line 664 of file document.h.
|
inherited |
Value iterator for iterating in array.
Definition at line 667 of file document.h.
typedef GenericValue<Encoding, Allocator> GenericDocument< Encoding, Allocator, StackAllocator >::ValueType |
Value type of the document.
Definition at line 2206 of file document.h.
|
inherited |
Definition at line 1990 of file document.h.
|
inlineexplicit |
Constructor.
Creates an empty document of specified type.
type | Mandatory type of object to create. |
allocator | Optional allocator for allocating memory. |
stackCapacity | Optional initial capacity of stack in bytes. |
stackAllocator | Optional allocator for allocating memory for stack. |
Definition at line 2216 of file document.h.
|
inline |
Constructor.
Creates an empty document which type is Null.
allocator | Optional allocator for allocating memory. |
stackCapacity | Optional initial capacity of stack in bytes. |
stackAllocator | Optional allocator for allocating memory for stack. |
Definition at line 2229 of file document.h.
|
inline |
Definition at line 2251 of file document.h.
|
inline |
Definition at line 2517 of file document.h.
|
inline |
Definition at line 2522 of file document.h.
|
inline |
Definition at line 2552 of file document.h.
|
inline |
Definition at line 2544 of file document.h.
|
inline |
Get the allocator of this document.
Definition at line 2491 of file document.h.
|
inlineinherited |
Definition at line 2107 of file document.h.
|
inline |
Get the position of last parsing error in input, 0 otherwise.
Definition at line 2473 of file document.h.
|
inlineinherited |
Definition at line 2109 of file document.h.
|
inline |
Get the ParseErrorCode of last parsing.
Definition at line 2470 of file document.h.
|
inline |
Get the capacity of stack in bytes.
Definition at line 2497 of file document.h.
|
inlineinherited |
Definition at line 2105 of file document.h.
|
inline |
Whether a parse error has occurred in the last parsing.
Definition at line 2467 of file document.h.
|
inline |
Definition at line 2518 of file document.h.
|
inline |
Definition at line 2520 of file document.h.
|
inline |
Definition at line 2542 of file document.h.
|
inline |
Definition at line 2516 of file document.h.
|
inline |
Implicit conversion to get the last parse result.
Definition at line 2487 of file document.h.
|
inline |
Parse JSON text from a read-only string.
parseFlags | Combination of ParseFlag (must not contain kParseInsituFlag). |
str | Read-only zero-terminated string to be parsed. |
Definition at line 2415 of file document.h.
|
inline |
Parse JSON text from a read-only string (with kParseDefaultFlags)
str | Read-only zero-terminated string to be parsed. |
Definition at line 2422 of file document.h.
|
inline |
Definition at line 2436 of file document.h.
|
inline |
Definition at line 2440 of file document.h.
|
inline |
Parse JSON text from a read-only string (with Encoding conversion)
parseFlags | Combination of ParseFlag (must not contain kParseInsituFlag). |
SourceEncoding | Transcoding from input Encoding |
str | Read-only zero-terminated string to be parsed. |
Definition at line 2404 of file document.h.
|
inline |
Definition at line 2427 of file document.h.
|
inline |
Parse JSON text from a mutable string.
parseFlags | Combination of ParseFlag. |
str | Mutable zero-terminated string to be parsed. |
Definition at line 2381 of file document.h.
|
inline |
Parse JSON text from a mutable string (with kParseDefaultFlags)
str | Mutable zero-terminated string to be parsed. |
Definition at line 2390 of file document.h.
|
inline |
Parse JSON text from an input stream (with Encoding conversion)
parseFlags | Combination of ParseFlag. |
SourceEncoding | Encoding of input stream |
InputStream | Type of input stream, implementing Stream concept |
is | Input stream to be parsed. |
Definition at line 2338 of file document.h.
|
inline |
Parse JSON text from an input stream.
parseFlags | Combination of ParseFlag. |
InputStream | Type of input stream, implementing Stream concept |
is | Input stream to be parsed. |
Definition at line 2357 of file document.h.
|
inline |
Parse JSON text from an input stream (with kParseDefaultFlags)
is | Input stream to be parsed. |
Definition at line 2367 of file document.h.
|
inline |
Populate this document by a generator which produces SAX events.
Generator | A functor with bool f(Handler) prototype. |
g | Generator functor which sends SAX events to the parameter. |
Definition at line 2318 of file document.h.
|
inherited |
Assignment with primitive types.
T | Either Type, int , unsigned , int64_t , uint64_t |
value | The value to be assigned. |
T
explicitly disallows all pointer types, especially (const
) Ch*. This helps avoiding implicitly referencing character strings with insufficient lifetime, use SetString(const Ch*, Allocator&) (for copying) or StringRef() (to explicitly mark the pointer as constant) instead. All other pointer types would implicitly convert to bool
, use SetBool() instead. Set boolean value
|
inlineinherited |
Assignment without calling destructor.
Definition at line 2163 of file document.h.
|
inline |
Definition at line 2524 of file document.h.
|
inlineinherited |
Definition at line 2113 of file document.h.
|
inlineinherited |
Definition at line 2108 of file document.h.
|
inlineinherited |
Definition at line 2110 of file document.h.
|
inlineinherited |
Initialize this value as object with initial data, without calling destructor.
Definition at line 2126 of file document.h.
|
inlineinherited |
Definition at line 2106 of file document.h.
|
inlineinherited |
Initialize this value as constant string, without calling destructor.
Definition at line 2139 of file document.h.
|
inlineinherited |
Initialize this value as copy string with initial data, without calling destructor.
Definition at line 2146 of file document.h.
|
inline |
Definition at line 2550 of file document.h.
|
inline |
Definition at line 2540 of file document.h.
|
inline |
Definition at line 2532 of file document.h.
|
inlineinherited |
Definition at line 2170 of file document.h.
|
inline |
Exchange the contents of this document with those of another.
rhs | Another document. |
Definition at line 2285 of file document.h.
|
inline |
Definition at line 2519 of file document.h.
|
inline |
Definition at line 2521 of file document.h.
|
friend |
Definition at line 2512 of file document.h.
|
friend |
free-standing swap function helper
Helper function to enable support for common swap implementation pattern based on std::swap:
Definition at line 2310 of file document.h.
|
inherited |
Definition at line 2185 of file document.h.
|
staticinherited |
Definition at line 2021 of file document.h.
|
staticinherited |
Definition at line 2022 of file document.h.