Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Référence du modèle de la classe GenericDocument< Encoding, Allocator, StackAllocator >

A document for parsing JSON text as DOM. Plus de détails...

#include <arcane/utils/internal/json/rapidjson/document.h>

+ Graphe d'héritage de GenericDocument< Encoding, Allocator, StackAllocator >:
+ Graphe de collaboration de GenericDocument< Encoding, Allocator, StackAllocator >:

Classes

struct  ClearStackOnExit
 

Types publics

typedef Encoding::Ch Ch
 Character type derived from Encoding.
 
typedef GenericValue< Encoding, AllocatorValueType
 Value type of the document.
 
typedef Allocator AllocatorType
 Allocator type from template parameter.
 
- Types publics hérités de GenericValue< Encoding, Allocator >
typedef GenericMember< Encoding, AllocatorMember
 Name-value pair in an object.
 
typedef Encoding EncodingType
 Encoding type from template parameter.
 
typedef Allocator AllocatorType
 Allocator type from template parameter.
 
typedef Encoding::Ch Ch
 Character type derived from Encoding.
 
typedef GenericStringRef< ChStringRefType
 Reference to a constant string.
 
typedef GenericMemberIterator< false, Encoding, Allocator >::Iterator MemberIterator
 Member iterator for iterating in object.
 
typedef GenericMemberIterator< true, Encoding, Allocator >::Iterator ConstMemberIterator
 Constant member iterator for iterating in object.
 
typedef GenericValueValueIterator
 Value iterator for iterating in array.
 
typedef const GenericValueConstValueIterator
 Constant value iterator for iterating in array.
 
typedef GenericValue< Encoding, AllocatorValueType
 Value type of itself.
 
typedef GenericArray< false, ValueTypeArray
 
typedef GenericArray< true, ValueTypeConstArray
 
typedef GenericObject< false, ValueTypeObject
 
typedef GenericObject< true, ValueTypeConstObject
 
enum  {
  kBoolFlag = 0x0008 , kNumberFlag = 0x0010 , kIntFlag = 0x0020 , kUintFlag = 0x0040 ,
  kInt64Flag = 0x0080 , kUint64Flag = 0x0100 , kDoubleFlag = 0x0200 , kStringFlag = 0x0400 ,
  kCopyFlag = 0x0800 , kInlineStrFlag = 0x1000 , kNullFlag = kNullType , kTrueFlag = kTrueType | kBoolFlag ,
  kFalseFlag = kFalseType | kBoolFlag , kNumberIntFlag = kNumberType | kNumberFlag | kIntFlag | kInt64Flag , kNumberUintFlag = kNumberType | kNumberFlag | kUintFlag | kUint64Flag | kInt64Flag , kNumberInt64Flag = kNumberType | kNumberFlag | kInt64Flag ,
  kNumberUint64Flag = kNumberType | kNumberFlag | kUint64Flag , kNumberDoubleFlag = kNumberType | kNumberFlag | kDoubleFlag , kNumberAnyFlag = kNumberType | kNumberFlag | kIntFlag | kInt64Flag | kUintFlag | kUint64Flag | kDoubleFlag , kConstStringFlag = kStringType | kStringFlag ,
  kCopyStringFlag = kStringType | kStringFlag | kCopyFlag , kShortStringFlag = kStringType | kStringFlag | kCopyFlag | kInlineStrFlag , kObjectFlag = kObjectType , kArrayFlag = kArrayType ,
  kTypeMask = 0x07
}
 

Fonctions membres publiques

 GenericDocument (Type type, Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0)
 Constructor.
 
 GenericDocument (Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0)
 Constructor.
 
GenericDocumentSwap (GenericDocument &rhs) RAPIDJSON_NOEXCEPT
 Exchange the contents of this document with those of another.
 
template<typename Generator >
GenericDocumentPopulate (Generator &g)
 Populate this document by a generator which produces SAX events.
 
AllocatorGetAllocator ()
 Get the allocator of this document.
 
size_t GetStackCapacity () const
 Get the capacity of stack in bytes.
 
bool Null ()
 
bool Bool (bool b)
 
bool Int (int i)
 
bool Uint (unsigned i)
 
bool Int64 (int64_t i)
 
bool Uint64 (uint64_t i)
 
bool Double (double d)
 
bool RawNumber (const Ch *str, SizeType length, bool copy)
 
bool String (const Ch *str, SizeType length, bool copy)
 
bool StartObject ()
 
bool Key (const Ch *str, SizeType length, bool copy)
 
bool EndObject (SizeType memberCount)
 
bool StartArray ()
 
bool EndArray (SizeType elementCount)
 
Parse from stream
template<unsigned parseFlags, typename SourceEncoding , typename InputStream >
GenericDocumentParseStream (InputStream &is)
 Parse JSON text from an input stream (with Encoding conversion)
 
template<unsigned parseFlags, typename InputStream >
GenericDocumentParseStream (InputStream &is)
 Parse JSON text from an input stream.
 
template<typename InputStream >
GenericDocumentParseStream (InputStream &is)
 Parse JSON text from an input stream (with kParseDefaultFlags)
 
Parse in-place from mutable string
template<unsigned parseFlags>
GenericDocumentParseInsitu (Ch *str)
 Parse JSON text from a mutable string.
 
GenericDocumentParseInsitu (Ch *str)
 Parse JSON text from a mutable string (with kParseDefaultFlags)
 
Parse from read-only string
template<unsigned parseFlags, typename SourceEncoding >
GenericDocumentParse (const typename SourceEncoding::Ch *str)
 Parse JSON text from a read-only string (with Encoding conversion)
 
template<unsigned parseFlags>
GenericDocumentParse (const Ch *str)
 Parse JSON text from a read-only string.
 
GenericDocumentParse (const Ch *str)
 Parse JSON text from a read-only string (with kParseDefaultFlags)
 
template<unsigned parseFlags, typename SourceEncoding >
GenericDocumentParse (const typename SourceEncoding::Ch *str, size_t length)
 
template<unsigned parseFlags>
GenericDocumentParse (const Ch *str, size_t length)
 
GenericDocumentParse (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.
 
- Fonctions membres publiques hérités de GenericValue< Encoding, Allocator >
GenericValueoperator= (GenericValue &rhs) RAPIDJSON_NOEXCEPT
 Assignment with move semantics.
 
GenericValueoperator= (StringRefType str) RAPIDJSON_NOEXCEPT
 Assignment of constant string reference (no copy)
 
template<typename T >
 RAPIDJSON_DISABLEIF_RETURN ((internal::IsPointer< T >),(GenericValue &)) operator
 Assignment with primitive types.
 
RAPIDJSON_FORCEINLINE const ChGetStringPointer () const
 
RAPIDJSON_FORCEINLINE const ChSetStringPointer (const Ch *str)
 
RAPIDJSON_FORCEINLINE GenericValueGetElementsPointer () const
 
RAPIDJSON_FORCEINLINE GenericValueSetElementsPointer (GenericValue *elements)
 
RAPIDJSON_FORCEINLINE MemberGetMembersPointer () const
 
RAPIDJSON_FORCEINLINE MemberSetMembersPointer (Member *members)
 
void SetArrayRaw (GenericValue *values, SizeType count, Allocator &allocator)
 
void SetObjectRaw (Member *members, SizeType count, 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, Allocator &allocator)
 Initialize this value as copy string with initial data, without calling destructor.
 
void RawAssign (GenericValue &rhs) RAPIDJSON_NOEXCEPT
 Assignment without calling destructor.
 
template<typename SourceAllocator >
bool StringEqual (const GenericValue< Encoding, SourceAllocator > &rhs) const
 
 GenericValue () RAPIDJSON_NOEXCEPT
 Default constructor creates a null value.
 
 GenericValue (Type type) RAPIDJSON_NOEXCEPT
 Constructor with JSON value type.
 
template<typename SourceAllocator >
 GenericValue (const GenericValue< Encoding, SourceAllocator > &rhs, Allocator &allocator, bool copyConstStrings=false)
 Explicit copy constructor (with allocator)
 
template<typename T >
 GenericValue (T b, RAPIDJSON_ENABLEIF((internal::IsSame< bool, T >))) RAPIDJSON_NOEXCEPT
 Constructor for boolean value.
 
 GenericValue (int i) RAPIDJSON_NOEXCEPT
 Constructor for int value.
 
 GenericValue (unsigned u) RAPIDJSON_NOEXCEPT
 Constructor for unsigned value.
 
 GenericValue (int64_t i64) RAPIDJSON_NOEXCEPT
 Constructor for int64_t value.
 
 GenericValue (uint64_t u64) RAPIDJSON_NOEXCEPT
 Constructor for uint64_t value.
 
 GenericValue (double d) RAPIDJSON_NOEXCEPT
 Constructor for double value.
 
 GenericValue (float f) RAPIDJSON_NOEXCEPT
 Constructor for float value.
 
 GenericValue (const Ch *s, SizeType length) RAPIDJSON_NOEXCEPT
 Constructor for constant string (i.e. do not make a copy of string)
 
 GenericValue (StringRefType s) RAPIDJSON_NOEXCEPT
 Constructor for constant string (i.e. do not make a copy of string)
 
 GenericValue (const Ch *s, SizeType length, Allocator &allocator)
 Constructor for copy-string (i.e. do make a copy of string)
 
 GenericValue (const Ch *s, Allocator &allocator)
 Constructor for copy-string (i.e. do make a copy of string)
 
 GenericValue (Array a) RAPIDJSON_NOEXCEPT
 Constructor for Array.
 
 GenericValue (Object o) RAPIDJSON_NOEXCEPT
 Constructor for Object.
 
 ~GenericValue ()
 Destructor.
 

Fonctions membres privées

 GenericDocument (const GenericDocument &)
 Prohibit copying.
 
GenericDocumentoperator= (const GenericDocument &)
 Prohibit assignment.
 
void ClearStack ()
 
void Destroy ()
 

Attributs privés

Allocatorallocator_
 
AllocatorownAllocator_
 
internal::Stack< StackAllocator > stack_
 
ParseResult parseResult_
 

Attributs privés statiques

static const size_t kDefaultStackCapacity = 1024
 

Amis

template<typename , typename >
class GenericValue
 
void swap (GenericDocument &a, GenericDocument &b) RAPIDJSON_NOEXCEPT
 free-standing swap function helper
 

Membres hérités additionnels

- Attributs publics hérités de GenericValue< Encoding, Allocator >
Data data_
 
- Attributs publics statiques hérités de GenericValue< Encoding, Allocator >
static const SizeType kDefaultArrayCapacity = 16
 
static const SizeType kDefaultObjectCapacity = 16
 

Description détaillée

template<typename Encoding, typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
class GenericDocument< Encoding, Allocator, StackAllocator >

A document for parsing JSON text as DOM.

Note
implements Handler concept
Paramètres du template
EncodingEncoding for both parsing and string storage.
AllocatorAllocator for allocating memory for the DOM
StackAllocatorAllocator for allocating memory for stack during parsing.
Avertissement
Although GenericDocument inherits from GenericValue, the API does not provide any virtual functions, especially no virtual destructor. To avoid memory leaks, do not delete a GenericDocument object via a pointer to a GenericValue.

Définition à la ligne 2155 du fichier document.h.

Documentation des définitions de type membres

◆ AllocatorType

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
typedef Allocator GenericDocument< Encoding, Allocator, StackAllocator >::AllocatorType

Allocator type from template parameter.

Définition à la ligne 2159 du fichier document.h.

◆ Ch

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
typedef Encoding::Ch GenericDocument< Encoding, Allocator, StackAllocator >::Ch

Character type derived from Encoding.

Définition à la ligne 2157 du fichier document.h.

◆ ValueType

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
typedef GenericValue<Encoding, Allocator> GenericDocument< Encoding, Allocator, StackAllocator >::ValueType

Value type of the document.

Définition à la ligne 2158 du fichier document.h.

Documentation des constructeurs et destructeur

◆ GenericDocument() [1/2]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
GenericDocument< Encoding, Allocator, StackAllocator >::GenericDocument ( Type  type,
Allocator allocator = 0,
size_t  stackCapacity = kDefaultStackCapacity,
StackAllocator *  stackAllocator = 0 
)
inlineexplicit

Constructor.

Creates an empty document of specified type.

Paramètres
typeMandatory type of object to create.
allocatorOptional allocator for allocating memory.
stackCapacityOptional initial capacity of stack in bytes.
stackAllocatorOptional allocator for allocating memory for stack.

Définition à la ligne 2168 du fichier document.h.

Références RAPIDJSON_NEW.

◆ GenericDocument() [2/2]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
GenericDocument< Encoding, Allocator, StackAllocator >::GenericDocument ( Allocator allocator = 0,
size_t  stackCapacity = kDefaultStackCapacity,
StackAllocator *  stackAllocator = 0 
)
inline

Constructor.

Creates an empty document which type is Null.

Paramètres
allocatorOptional allocator for allocating memory.
stackCapacityOptional initial capacity of stack in bytes.
stackAllocatorOptional allocator for allocating memory for stack.

Définition à la ligne 2181 du fichier document.h.

Références RAPIDJSON_NEW.

◆ ~GenericDocument()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
GenericDocument< Encoding, Allocator, StackAllocator >::~GenericDocument ( )
inline

Définition à la ligne 2203 du fichier document.h.

Documentation des fonctions membres

◆ Bool()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::Bool ( bool  b)
inline

Définition à la ligne 2469 du fichier document.h.

◆ ClearStack()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
void GenericDocument< Encoding, Allocator, StackAllocator >::ClearStack ( )
inlineprivate

Définition à la ligne 2516 du fichier document.h.

◆ Destroy()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
void GenericDocument< Encoding, Allocator, StackAllocator >::Destroy ( )
inlineprivate

Définition à la ligne 2525 du fichier document.h.

◆ Double()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::Double ( double  d)
inline

Définition à la ligne 2474 du fichier document.h.

◆ EndArray()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::EndArray ( SizeType  elementCount)
inline

Définition à la ligne 2504 du fichier document.h.

◆ EndObject()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::EndObject ( SizeType  memberCount)
inline

Définition à la ligne 2496 du fichier document.h.

◆ GetAllocator()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
Allocator & GenericDocument< Encoding, Allocator, StackAllocator >::GetAllocator ( )
inline

Get the allocator of this document.

Définition à la ligne 2443 du fichier document.h.

Références RAPIDJSON_ASSERT.

◆ GetErrorOffset()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
size_t GenericDocument< Encoding, Allocator, StackAllocator >::GetErrorOffset ( ) const
inline

Get the position of last parsing error in input, 0 otherwise.

Définition à la ligne 2425 du fichier document.h.

Références ParseResult::Offset().

◆ GetParseError()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
ParseErrorCode GenericDocument< Encoding, Allocator, StackAllocator >::GetParseError ( ) const
inline

Get the ParseErrorCode of last parsing.

Définition à la ligne 2422 du fichier document.h.

Références ParseResult::Code().

◆ GetStackCapacity()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
size_t GenericDocument< Encoding, Allocator, StackAllocator >::GetStackCapacity ( ) const
inline

Get the capacity of stack in bytes.

Définition à la ligne 2449 du fichier document.h.

◆ HasParseError()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::HasParseError ( ) const
inline

Whether a parse error has occurred in the last parsing.

Définition à la ligne 2419 du fichier document.h.

Références ParseResult::IsError().

◆ Int()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::Int ( int  i)
inline

Définition à la ligne 2470 du fichier document.h.

◆ Int64()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::Int64 ( int64_t  i)
inline

Définition à la ligne 2472 du fichier document.h.

◆ Key()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::Key ( const Ch str,
SizeType  length,
bool  copy 
)
inline

Définition à la ligne 2494 du fichier document.h.

◆ Null()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::Null ( )
inline

Définition à la ligne 2468 du fichier document.h.

◆ operator ParseResult()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
GenericDocument< Encoding, Allocator, StackAllocator >::operator ParseResult ( ) const
inline

Implicit conversion to get the last parse result.

Renvoie
ParseResult of the last parse operation
ParseResult ok = doc.Parse(json);
if (!ok)
printf( "JSON parse error: %s (%u)\n", GetParseError_En(ok.Code()), ok.Offset());
GenericDocument & Parse(const typename SourceEncoding::Ch *str)
Parse JSON text from a read-only string (with Encoding conversion)
Definition document.h:2356
RAPIDJSON_NAMESPACE_BEGIN const RAPIDJSON_ERROR_CHARTYPE * GetParseError_En(ParseErrorCode parseErrorCode)
Maps error code of parsing into error message.
Definition en.h:37
Result of parsing (wraps ParseErrorCode)
Definition error.h:107
ParseErrorCode Code() const
Get the error code.
Definition error.h:117
size_t Offset() const
Get the error offset, if IsError(), 0 otherwise.
Definition error.h:119

Définition à la ligne 2439 du fichier document.h.

◆ Parse() [1/6]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<unsigned parseFlags>
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::Parse ( const Ch str)
inline

Parse JSON text from a read-only string.

Paramètres du template
parseFlagsCombination of ParseFlag (must not contain kParseInsituFlag).
Paramètres
strRead-only zero-terminated string to be parsed.

Définition à la ligne 2367 du fichier document.h.

◆ Parse() [2/6]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::Parse ( const Ch str)
inline

Parse JSON text from a read-only string (with kParseDefaultFlags)

Paramètres
strRead-only zero-terminated string to be parsed.

Définition à la ligne 2374 du fichier document.h.

◆ Parse() [3/6]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<unsigned parseFlags>
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::Parse ( const Ch str,
size_t  length 
)
inline

Définition à la ligne 2388 du fichier document.h.

◆ Parse() [4/6]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::Parse ( const Ch str,
size_t  length 
)
inline

Définition à la ligne 2392 du fichier document.h.

◆ Parse() [5/6]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<unsigned parseFlags, typename SourceEncoding >
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::Parse ( const typename SourceEncoding::Ch *  str)
inline

Parse JSON text from a read-only string (with Encoding conversion)

Paramètres du template
parseFlagsCombination of ParseFlag (must not contain kParseInsituFlag).
SourceEncodingTranscoding from input Encoding
Paramètres
strRead-only zero-terminated string to be parsed.

Définition à la ligne 2356 du fichier document.h.

Références kParseInsituFlag, et RAPIDJSON_ASSERT.

◆ Parse() [6/6]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<unsigned parseFlags, typename SourceEncoding >
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::Parse ( const typename SourceEncoding::Ch *  str,
size_t  length 
)
inline

Définition à la ligne 2379 du fichier document.h.

◆ ParseInsitu() [1/2]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<unsigned parseFlags>
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::ParseInsitu ( Ch str)
inline

Parse JSON text from a mutable string.

Paramètres du template
parseFlagsCombination of ParseFlag.
Paramètres
strMutable zero-terminated string to be parsed.
Renvoie
The document itself for fluent API.

Définition à la ligne 2333 du fichier document.h.

◆ ParseInsitu() [2/2]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::ParseInsitu ( Ch str)
inline

Parse JSON text from a mutable string (with kParseDefaultFlags)

Paramètres
strMutable zero-terminated string to be parsed.
Renvoie
The document itself for fluent API.

Définition à la ligne 2342 du fichier document.h.

◆ ParseStream() [1/3]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<unsigned parseFlags, typename SourceEncoding , typename InputStream >
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::ParseStream ( InputStream &  is)
inline

Parse JSON text from an input stream (with Encoding conversion)

Paramètres du template
parseFlagsCombination of ParseFlag.
SourceEncodingEncoding of input stream
InputStreamType of input stream, implementing Stream concept
Paramètres
isInput stream to be parsed.
Renvoie
The document itself for fluent API.

Définition à la ligne 2290 du fichier document.h.

Références GenericValue< Encoding, Allocator >::operator=(), et RAPIDJSON_ASSERT.

◆ ParseStream() [2/3]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<unsigned parseFlags, typename InputStream >
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::ParseStream ( InputStream &  is)
inline

Parse JSON text from an input stream.

Paramètres du template
parseFlagsCombination of ParseFlag.
InputStreamType of input stream, implementing Stream concept
Paramètres
isInput stream to be parsed.
Renvoie
The document itself for fluent API.

Définition à la ligne 2309 du fichier document.h.

◆ ParseStream() [3/3]

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<typename InputStream >
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::ParseStream ( InputStream &  is)
inline

Parse JSON text from an input stream (with kParseDefaultFlags)

Paramètres du template
InputStreamType of input stream, implementing Stream concept
Paramètres
isInput stream to be parsed.
Renvoie
The document itself for fluent API.

Définition à la ligne 2319 du fichier document.h.

◆ Populate()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<typename Generator >
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::Populate ( Generator &  g)
inline

Populate this document by a generator which produces SAX events.

Paramètres du template
GeneratorA functor with bool f(Handler) prototype.
Paramètres
gGenerator functor which sends SAX events to the parameter.
Renvoie
The document itself for fluent API.

Définition à la ligne 2270 du fichier document.h.

Références GenericValue< Encoding, Allocator >::operator=(), et RAPIDJSON_ASSERT.

◆ RawNumber()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::RawNumber ( const Ch str,
SizeType  length,
bool  copy 
)
inline

Définition à la ligne 2476 du fichier document.h.

◆ StartArray()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::StartArray ( )
inline

Définition à la ligne 2502 du fichier document.h.

◆ StartObject()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::StartObject ( )
inline

Définition à la ligne 2492 du fichier document.h.

◆ String()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::String ( const Ch str,
SizeType  length,
bool  copy 
)
inline

Définition à la ligne 2484 du fichier document.h.

◆ Swap()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
GenericDocument & GenericDocument< Encoding, Allocator, StackAllocator >::Swap ( GenericDocument< Encoding, Allocator, StackAllocator > &  rhs)
inline

Exchange the contents of this document with those of another.

Paramètres
rhsAnother document.
Note
Constant complexity.
Voir également
GenericValue::Swap

Définition à la ligne 2237 du fichier document.h.

◆ Uint()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::Uint ( unsigned  i)
inline

Définition à la ligne 2471 du fichier document.h.

◆ Uint64()

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
bool GenericDocument< Encoding, Allocator, StackAllocator >::Uint64 ( uint64_t  i)
inline

Définition à la ligne 2473 du fichier document.h.

Documentation des fonctions amies et associées

◆ GenericValue

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
template<typename , typename >
friend class GenericValue
friend

Définition à la ligne 2464 du fichier document.h.

◆ swap

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
void swap ( GenericDocument< Encoding, Allocator, StackAllocator > &  a,
GenericDocument< Encoding, Allocator, StackAllocator > &  b 
)
friend

free-standing swap function helper

Helper function to enable support for common swap implementation pattern based on std::swap:

void swap(MyClass& a, MyClass& b) {
using std::swap;
swap(a.doc, b.doc);
// ...
}
friend void swap(GenericDocument &a, GenericDocument &b) RAPIDJSON_NOEXCEPT
free-standing swap function helper
Definition document.h:2262
Voir également
Swap()

Définition à la ligne 2262 du fichier document.h.

Documentation des données membres

◆ allocator_

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
Allocator* GenericDocument< Encoding, Allocator, StackAllocator >::allocator_
private

Définition à la ligne 2530 du fichier document.h.

◆ kDefaultStackCapacity

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
const size_t GenericDocument< Encoding, Allocator, StackAllocator >::kDefaultStackCapacity = 1024
staticprivate

Définition à la ligne 2529 du fichier document.h.

◆ ownAllocator_

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
Allocator* GenericDocument< Encoding, Allocator, StackAllocator >::ownAllocator_
private

Définition à la ligne 2531 du fichier document.h.

◆ parseResult_

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
ParseResult GenericDocument< Encoding, Allocator, StackAllocator >::parseResult_
private

Définition à la ligne 2533 du fichier document.h.

◆ stack_

template<typename Encoding , typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
internal::Stack<StackAllocator> GenericDocument< Encoding, Allocator, StackAllocator >::stack_
private

Définition à la ligne 2532 du fichier document.h.


La documentation de cette classe a été générée à partir du fichier suivant :