RapidJSON: rapidjson::GenericSchemaDocument< ValueT, Allocator > 模板类 参考

类 | Public 类型 | Public 成员函数 | 友元 | 所有成员列表
rapidjson::GenericSchemaDocument< ValueT, Allocator > 模板类 参考

JSON schema document. 更多...

`#include <schema.h>`

## Public 类型
typedef ValueT | ValueType
typedef IGenericRemoteSchemaDocumentProvider< GenericSchemaDocument > | IRemoteSchemaDocumentProviderType
typedef Allocator | AllocatorType
typedef ValueType::EncodingType | EncodingType
typedef EncodingType::Ch | Ch
typedef internal::Schema< GenericSchemaDocument > | SchemaType
typedef GenericPointer< ValueType, Allocator > | PointerType
typedef GenericValue< EncodingType, Allocator > | URIType

## Public 成员函数
| GenericSchemaDocument (const ValueType &document, const Ch *uri=0, SizeType uriLength=0, IRemoteSchemaDocumentProviderType *remoteProvider=0, Allocator *allocator=0)
| Constructor. 更多...
| ~GenericSchemaDocument ()
| Destructor
const URIType & | GetURI () const
const SchemaType & | GetRoot () const
| Get the root schema.

## 友元
template<typename , typename , typename >
class | GenericSchemaValidator

## 详细描述

### template<typename ValueT, typename Allocator = CrtAllocator>
class rapidjson::GenericSchemaDocument< ValueT, Allocator >

JSON schema document.

A JSON schema document is a compiled version of a JSON schema. It is basically a tree of internal::Schema.

注解
  This is an immutable class (i.e. its instance cannot be modified after construction).

模板参数

  ValueT | Type of JSON value (e.g. `Value` ), which also determine the encoding.
  Allocator | Allocator type for allocating memory of this document.

## 构造及析构函数说明

## ◆ GenericSchemaDocument()

template<typename ValueT , typename Allocator = CrtAllocator>

rapidjson::GenericSchemaDocument< ValueT, Allocator >::GenericSchemaDocument | ( | const ValueType & | document,
|  | const Ch * | uri = `0`,
|  | SizeType | uriLength = `0`,
|  | IRemoteSchemaDocumentProviderType * | remoteProvider = `0`,
|  | Allocator * | allocator = `0`
| ) |  |
| inlineexplicit

Constructor.

Compile a JSON document into schema document.

参数

  document | A JSON document as source.
  uri | The base URI of this schema document for purposes of violation reporting.
  uriLength | Length of `name`, in code points.
  remoteProvider | An optional remote schema document provider for resolving remote reference. Can be null.
  allocator | An optional allocator instance for allocating memory. Can be null.

该类的文档由以下文件生成:

- include/rapidjson/fwd.h
- include/rapidjson/schema.h