NGL  6.5
The NCCA Graphics Library
GenericDocument< Encoding, Allocator, StackAllocator > Class Template Reference

A document for parsing JSON text as DOM. More...

#include <document.h>

+ Inheritance diagram for GenericDocument< Encoding, Allocator, StackAllocator >:
+ Collaboration diagram for GenericDocument< Encoding, Allocator, StackAllocator >:

Classes

struct  ClearStackOnExit
 

Public Types

typedef Encoding::Ch Ch
 Character type derived from Encoding. More...
 
typedef GenericValue< Encoding, Allocator > ValueType
 Value type of the document. More...
 
typedef Allocator AllocatorType
 Allocator type from template parameter. More...
 
- Public Types inherited from GenericValue< Encoding, Allocator >
enum  {
  kBoolFlag = 0x100, kNumberFlag = 0x200, kIntFlag = 0x400, kUintFlag = 0x800,
  kInt64Flag = 0x1000, kUint64Flag = 0x2000, kDoubleFlag = 0x4000, kStringFlag = 0x100000,
  kCopyFlag = 0x200000, kInlineStrFlag = 0x400000, 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 = 0xFF
}
 
typedef GenericMember< Encoding, Allocator > Member
 Name-value pair in an object. More...
 
typedef Encoding EncodingType
 Encoding type from template parameter. More...
 
typedef Allocator AllocatorType
 Allocator type from template parameter. More...
 
typedef Encoding::Ch Ch
 Character type derived from Encoding. More...
 
typedef GenericStringRef< ChStringRefType
 Reference to a constant string. More...
 
typedef GenericMemberIterator< false, Encoding, Allocator >::Iterator MemberIterator
 Member iterator for iterating in object. More...
 
typedef GenericMemberIterator< true, Encoding, Allocator >::Iterator ConstMemberIterator
 Constant member iterator for iterating in object. More...
 
typedef GenericValueValueIterator
 Value iterator for iterating in array. More...
 
typedef const GenericValueConstValueIterator
 Constant value iterator for iterating in array. More...
 
typedef GenericValue< Encoding, Allocator > ValueType
 Value type of itself. More...
 

Public Member Functions

 GenericDocument (Type type, Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0)
 Constructor. More...
 
 GenericDocument (Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0)
 Constructor. More...
 
 ~GenericDocument ()
 
GenericDocumentSwap (GenericDocument &rhs) RAPIDJSON_NOEXCEPT
 Exchange the contents of this document with those of another. More...
 
Allocator & GetAllocator ()
 Get the allocator of this document. More...
 
size_t GetStackCapacity () const
 Get the capacity of stack in bytes. More...
 
Parse from stream
template<unsigned parseFlags, typename SourceEncoding , typename InputStream >
GenericDocumentParseStream (InputStream &is)
 Parse JSON text from an input stream (with Encoding conversion) More...
 
template<unsigned parseFlags, typename InputStream >
GenericDocumentParseStream (InputStream &is)
 Parse JSON text from an input stream. More...
 
template<typename InputStream >
GenericDocumentParseStream (InputStream &is)
 Parse JSON text from an input stream (with kParseDefaultFlags) More...
 
Parse in-place from mutable string
template<unsigned parseFlags>
GenericDocumentParseInsitu (Ch *str)
 Parse JSON text from a mutable string. More...
 
GenericDocumentParseInsitu (Ch *str)
 Parse JSON text from a mutable string (with kParseDefaultFlags) More...
 
Parse from read-only string
template<unsigned parseFlags, typename SourceEncoding >
GenericDocumentParse (const Ch *str)
 Parse JSON text from a read-only string (with Encoding conversion) More...
 
template<unsigned parseFlags>
GenericDocumentParse (const Ch *str)
 Parse JSON text from a read-only string. More...
 
GenericDocumentParse (const Ch *str)
 Parse JSON text from a read-only string (with kParseDefaultFlags) More...
 
Handling parse errors
bool HasParseError () const
 Whether a parse error has occured in the last parsing. More...
 
ParseErrorCode GetParseError () const
 Get the ParseErrorCode of last parsing. More...
 
size_t GetErrorOffset () const
 Get the position of last parsing error in input, 0 otherwise. More...
 
- Public Member Functions inherited from GenericValue< Encoding, Allocator >
template<typename T >
 RAPIDJSON_DISABLEIF_RETURN ((internal::IsPointer< T >),(GenericValue &)) operator
 Assignment with primitive types. More...
 
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. More...
 
void SetStringRaw (StringRefType s) RAPIDJSON_NOEXCEPT
 Initialize this value as constant string, without calling destructor. More...
 
void SetStringRaw (StringRefType s, Allocator &allocator)
 Initialize this value as copy string with initial data, without calling destructor. More...
 
void RawAssign (GenericValue &rhs) RAPIDJSON_NOEXCEPT
 Assignment without calling destructor. More...
 
template<typename SourceAllocator >
bool StringEqual (const GenericValue< Encoding, SourceAllocator > &rhs) const
 
GenericValueoperator= (GenericValue &rhs) RAPIDJSON_NOEXCEPT
 Assignment with move semantics. More...
 
GenericValueoperator= (StringRefType str) RAPIDJSON_NOEXCEPT
 Assignment of constant string reference (no copy) More...
 
 GenericValue () RAPIDJSON_NOEXCEPT
 Default constructor creates a null value. More...
 
 GenericValue (Type type) RAPIDJSON_NOEXCEPT
 Constructor with JSON value type. More...
 
template<typename SourceAllocator >
 GenericValue (const GenericValue< Encoding, SourceAllocator > &rhs, Allocator &allocator)
 Explicit copy constructor (with allocator) More...
 
template<typename T >
 GenericValue (T b, RAPIDJSON_ENABLEIF((internal::IsSame< T, bool >))) RAPIDJSON_NOEXCEPT
 Constructor for boolean value. More...
 
 GenericValue (int i) RAPIDJSON_NOEXCEPT
 Constructor for int value. More...
 
 GenericValue (unsigned u) RAPIDJSON_NOEXCEPT
 Constructor for unsigned value. More...
 
 GenericValue (int64_t i64) RAPIDJSON_NOEXCEPT
 Constructor for int64_t value. More...
 
 GenericValue (uint64_t u64) RAPIDJSON_NOEXCEPT
 Constructor for uint64_t value. More...
 
 GenericValue (double d) RAPIDJSON_NOEXCEPT
 Constructor for double value. More...
 
 GenericValue (const Ch *s, SizeType length) RAPIDJSON_NOEXCEPT
 Constructor for constant string (i.e. do not make a copy of string) More...
 
 GenericValue (StringRefType s) RAPIDJSON_NOEXCEPT
 Constructor for constant string (i.e. do not make a copy of string) More...
 
 GenericValue (const Ch *s, SizeType length, Allocator &allocator)
 Constructor for copy-string (i.e. do make a copy of string) More...
 
 GenericValue (const Ch *s, Allocator &allocator)
 Constructor for copy-string (i.e. do make a copy of string) More...
 
 ~GenericValue ()
 Destructor. More...
 

Private Member Functions

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 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)
 
 GenericDocument (const GenericDocument &)
 Prohibit copying. More...
 
GenericDocumentoperator= (const GenericDocument &)
 Prohibit assignment. More...
 
void ClearStack ()
 
void Destroy ()
 

Private Attributes

Allocator * allocator_
 
Allocator * ownAllocator_
 
internal::Stack< StackAllocator > stack_
 
ParseResult parseResult_
 

Static Private Attributes

static const size_t kDefaultStackCapacity = 1024
 

Friends

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

Additional Inherited Members

- Public Attributes inherited from GenericValue< Encoding, Allocator >
Data data_
 
unsigned flags_
 
- Static Public Attributes inherited from GenericValue< Encoding, Allocator >
static const SizeType kDefaultArrayCapacity = 16
 
static const SizeType kDefaultObjectCapacity = 16
 

Detailed Description

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
Template Parameters
EncodingEncoding for both parsing and string storage.
AllocatorAllocator for allocating memory for the DOM
StackAllocatorAllocator for allocating memory for stack during parsing.
Warning
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.

Definition at line 73 of file document.h.

Member Typedef Documentation

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

Allocator type from template parameter.

Definition at line 1776 of file document.h.

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

Character type derived from Encoding.

Definition at line 1774 of file document.h.

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

Value type of the document.

Definition at line 1775 of file document.h.

Constructor & Destructor Documentation

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.

Parameters
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.

Definition at line 1785 of file document.h.

References RAPIDJSON_NEW.

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.

Parameters
allocatorOptional allocator for allocating memory.
stackCapacityOptional initial capacity of stack in bytes.
stackAllocatorOptional allocator for allocating memory for stack.

Definition at line 1798 of file document.h.

References std::move(), and RAPIDJSON_NEW.

+ Here is the call graph for this function:

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

Definition at line 1820 of file document.h.

References std::move().

+ Here is the call graph for this function:

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

Prohibit copying.

Member Function Documentation

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

Definition at line 2017 of file document.h.

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

Definition at line 2056 of file document.h.

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

Definition at line 2065 of file document.h.

References RAPIDJSON_DELETE.

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

Definition at line 2022 of file document.h.

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

Definition at line 2036 of file document.h.

References GenericValue< Encoding, Allocator >::SetObjectRaw(), and SizeType.

+ Here is the call graph for this function:

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

Get the allocator of this document.

Definition at line 1992 of file document.h.

References RAPIDJSON_ASSERT.

+ Here is the caller graph for this function:

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.

Definition at line 1987 of file document.h.

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

Get the ParseErrorCode of last parsing.

Definition at line 1984 of file document.h.

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.

Definition at line 1998 of file document.h.

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

Whether a parse error has occured in the last parsing.

Definition at line 1981 of file document.h.

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

Definition at line 2018 of file document.h.

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

Definition at line 2020 of file document.h.

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

Definition at line 2034 of file document.h.

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

Definition at line 2016 of file document.h.

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

Prohibit assignment.

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

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

Template Parameters
parseFlagsCombination of ParseFlag (must not contain kParseInsituFlag).
SourceEncodingTranscoding from input Encoding
Parameters
strRead-only zero-terminated string to be parsed.

Definition at line 1954 of file document.h.

References kParseInsituFlag, and RAPIDJSON_ASSERT.

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.

Template Parameters
parseFlagsCombination of ParseFlag (must not contain kParseInsituFlag).
Parameters
strRead-only zero-terminated string to be parsed.

Definition at line 1965 of file document.h.

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)

Parameters
strRead-only zero-terminated string to be parsed.

Definition at line 1972 of file document.h.

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.

Template Parameters
parseFlagsCombination of ParseFlag.
Parameters
strMutable zero-terminated string to be parsed.
Returns
The document itself for fluent API.

Definition at line 1931 of file document.h.

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)

Parameters
strMutable zero-terminated string to be parsed.
Returns
The document itself for fluent API.

Definition at line 1940 of file document.h.

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)

Template Parameters
parseFlagsCombination of ParseFlag.
SourceEncodingEncoding of input stream
InputStreamType of input stream, implementing Stream concept
Parameters
isInput stream to be parsed.
Returns
The document itself for fluent API.

Definition at line 1888 of file document.h.

References RAPIDJSON_ASSERT.

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.

Template Parameters
parseFlagsCombination of ParseFlag.
InputStreamType of input stream, implementing Stream concept
Parameters
isInput stream to be parsed.
Returns
The document itself for fluent API.

Definition at line 1907 of file document.h.

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)

Template Parameters
InputStreamType of input stream, implementing Stream concept
Parameters
isInput stream to be parsed.
Returns
The document itself for fluent API.

Definition at line 1917 of file document.h.

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

Definition at line 2042 of file document.h.

References kArrayType.

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

Definition at line 2032 of file document.h.

References kObjectType.

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

Definition at line 2024 of file document.h.

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.

Parameters
otherAnother document.
Note
Constant complexity.
See also
GenericValue::Swap

Definition at line 1854 of file document.h.

References internal::Swap().

+ Here is the call graph for this function:

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

Definition at line 2019 of file document.h.

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

Definition at line 2021 of file document.h.

Friends And Related Function Documentation

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

Definition at line 2012 of file document.h.

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

Definition at line 2013 of file document.h.

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);
// ...
}
See also
Swap()

Definition at line 1875 of file document.h.

Member Data Documentation

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

Definition at line 2070 of file document.h.

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

Definition at line 2069 of file document.h.

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

Definition at line 2071 of file document.h.

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

Definition at line 2073 of file document.h.

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

Definition at line 2072 of file document.h.


The documentation for this class was generated from the following file: