IN2OSM  1.0.1
document.h File Reference
#include "reader.h"
#include "internal/meta.h"
#include "internal/strfunc.h"
#include "memorystream.h"
#include "encodedstream.h"
#include <new>
#include <limits>
#include <iterator>
Include dependency graph for document.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GenericValue< Encoding, Allocator >
 Represents a JSON value. Use Value for UTF8 encoding and default allocator. More...
 
class  GenericDocument< Encoding, Allocator, StackAllocator >
 A document for parsing JSON text as DOM. More...
 
struct  GenericMember< Encoding, Allocator >
 Name-value pair in a JSON object value. More...
 
class  GenericMemberIterator< Const, Encoding, Allocator >
 (Constant) member iterator for a JSON object value More...
 
struct  GenericStringRef< CharType >
 Reference to a constant string (not taking a copy) More...
 
struct  IsGenericValueImpl< T, Encoding, Allocator >
 
struct  IsGenericValueImpl< T, typename Void< typename T::EncodingType >::Type, typename Void< typename T::AllocatorType >::Type >
 
struct  IsGenericValue< T >
 
struct  TypeHelper< ValueType, T >
 
struct  TypeHelper< ValueType, bool >
 
struct  TypeHelper< ValueType, int >
 
struct  TypeHelper< ValueType, unsigned >
 
struct  TypeHelper< ValueType, int64_t >
 
struct  TypeHelper< ValueType, uint64_t >
 
struct  TypeHelper< ValueType, double >
 
struct  TypeHelper< ValueType, float >
 
struct  TypeHelper< ValueType, const typename ValueType::Ch * >
 
struct  TypeHelper< ValueType, typename ValueType::Array >
 
struct  TypeHelper< ValueType, typename ValueType::ConstArray >
 
struct  TypeHelper< ValueType, typename ValueType::Object >
 
struct  TypeHelper< ValueType, typename ValueType::ConstObject >
 
class  GenericArray< Const, ValueT >
 Helper class for accessing Value of array type. More...
 
class  GenericObject< Const, ValueT >
 Helper class for accessing Value of object type. More...
 
class  GenericValue< Encoding, Allocator >
 Represents a JSON value. Use Value for UTF8 encoding and default allocator. More...
 
struct  GenericValue< Encoding, Allocator >::Flag
 
struct  GenericValue< Encoding, Allocator >::String
 
struct  GenericValue< Encoding, Allocator >::ShortString
 
union  GenericValue< Encoding, Allocator >::Number
 
struct  GenericValue< Encoding, Allocator >::Number::I
 
struct  GenericValue< Encoding, Allocator >::Number::U
 
struct  GenericValue< Encoding, Allocator >::ObjectData
 
struct  GenericValue< Encoding, Allocator >::ArrayData
 
union  GenericValue< Encoding, Allocator >::Data
 
class  GenericDocument< Encoding, Allocator, StackAllocator >
 A document for parsing JSON text as DOM. More...
 
struct  GenericDocument< Encoding, Allocator, StackAllocator >::ClearStackOnExit
 
class  GenericArray< Const, ValueT >
 Helper class for accessing Value of array type. More...
 
class  GenericObject< Const, ValueT >
 Helper class for accessing Value of object type. More...
 

Namespaces

 internal
 

Typedefs

typedef GenericValue< UTF8<> > Value
 GenericValue with UTF8 encoding. More...
 
typedef GenericDocument< UTF8<> > Document
 GenericDocument with UTF8 encoding. More...
 

Functions

template<typename CharType >
GenericStringRef< CharType > StringRef (const CharType *str)
 Mark a character pointer as constant string. More...
 
template<typename CharType >
GenericStringRef< CharType > StringRef (const CharType *str, size_t length)
 Mark a character pointer as constant string. More...
 

Typedef Documentation

◆ Document

GenericDocument with UTF8 encoding.

Definition at line 2506 of file document.h.

◆ Value

typedef GenericValue<UTF8<> > Value

GenericValue with UTF8 encoding.

Definition at line 2110 of file document.h.

Function Documentation

◆ StringRef() [1/2]

GenericStringRef< CharType > StringRef ( const CharType *  str)
inline

Mark a character pointer as constant string.

Mark a plain character pointer as a "string literal". This function can be used to avoid copying a character string to be referenced as a value in a JSON GenericValue object, if the string's lifetime is known to be valid long enough.

Template Parameters
CharTypeCharacter type of the string
Parameters
strConstant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
Returns
GenericStringRef string reference object
See also
GenericValue::GenericValue(StringRefType), GenericValue::operator=(StringRefType), GenericValue::SetString(StringRefType), GenericValue::PushBack(StringRefType, Allocator&), GenericValue::AddMember

Definition at line 364 of file document.h.

364  {
365  return GenericStringRef<CharType>(str);
366 }
Reference to a constant string (not taking a copy)
Definition: document.h:256
Here is the caller graph for this function:

◆ StringRef() [2/2]

GenericStringRef< CharType > StringRef ( const CharType *  str,
size_t  length 
)
inline

Mark a character pointer as constant string.

Mark a plain character pointer as a "string literal". This function can be used to avoid copying a character string to be referenced as a value in a JSON GenericValue object, if the string's lifetime is known to be valid long enough.

This version has better performance with supplied length, and also supports string containing null characters.

Template Parameters
CharTypecharacter type of the string
Parameters
strConstant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue
lengthThe length of source string.
Returns
GenericStringRef string reference object

Definition at line 384 of file document.h.

384  {
385  return GenericStringRef<CharType>(str, SizeType(length));
386 }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:384
Reference to a constant string (not taking a copy)
Definition: document.h:256
Here is the call graph for this function: