JSON schema document. More...
#include <fwd.h>
Classes | |
struct | SchemaEntry |
struct | SchemaRefEntry |
Public Types | |
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 Member Functions | |
GenericSchemaDocument (const ValueType &document, const Ch *uri=0, SizeType uriLength=0, IRemoteSchemaDocumentProviderType *remoteProvider=0, Allocator *allocator=0) | |
Constructor. More... | |
~GenericSchemaDocument () | |
Destructor. More... | |
const URIType & | GetURI () const |
const SchemaType & | GetRoot () const |
Get the root schema. More... | |
Private Member Functions | |
GenericSchemaDocument (const GenericSchemaDocument &) | |
Prohibit copying. More... | |
GenericSchemaDocument & | operator= (const GenericSchemaDocument &) |
Prohibit assignment. More... | |
void | CreateSchemaRecursive (const SchemaType **schema, const PointerType &pointer, const ValueType &v, const ValueType &document) |
void | CreateSchema (const SchemaType **schema, const PointerType &pointer, const ValueType &v, const ValueType &document) |
bool | HandleRefSchema (const PointerType &source, const SchemaType **schema, const ValueType &v, const ValueType &document) |
const SchemaType * | GetSchema (const PointerType &pointer) const |
PointerType | GetPointer (const SchemaType *schema) const |
const SchemaType * | GetTypeless () const |
Private Attributes | |
IRemoteSchemaDocumentProviderType * | remoteProvider_ |
Allocator * | allocator_ |
Allocator * | ownAllocator_ |
const SchemaType * | root_ |
Root schema. More... | |
SchemaType * | typeless_ |
internal::Stack< Allocator > | schemaMap_ |
internal::Stack< Allocator > | schemaRef_ |
URIType | uri_ |
Static Private Attributes | |
static const size_t | kInitialSchemaMapSize = 64 |
static const size_t | kInitialSchemaRefSize = 64 |
Friends | |
class | internal::Schema< GenericSchemaDocument > |
template<typename , typename , typename > | |
class | GenericSchemaValidator |
JSON schema document.
A JSON schema document is a compiled version of a JSON schema. It is basically a tree of internal::Schema.
ValueT | Type of JSON value (e.g. Value ), which also determine the encoding. |
Allocator | Allocator type for allocating memory of this document. |
typedef Allocator GenericSchemaDocument< ValueT, Allocator >::AllocatorType |
typedef EncodingType::Ch GenericSchemaDocument< ValueT, Allocator >::Ch |
typedef ValueType::EncodingType GenericSchemaDocument< ValueT, Allocator >::EncodingType |
typedef IGenericRemoteSchemaDocumentProvider<GenericSchemaDocument> GenericSchemaDocument< ValueT, Allocator >::IRemoteSchemaDocumentProviderType |
typedef GenericPointer<ValueType, Allocator> GenericSchemaDocument< ValueT, Allocator >::PointerType |
typedef internal::Schema<GenericSchemaDocument> GenericSchemaDocument< ValueT, Allocator >::SchemaType |
typedef GenericValue<EncodingType, Allocator> GenericSchemaDocument< ValueT, Allocator >::URIType |
typedef ValueT GenericSchemaDocument< ValueT, Allocator >::ValueType |
|
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. |
Definition at line 1523 of file schema.h.
|
inline |
Destructor.
Definition at line 1589 of file schema.h.
|
private |
Prohibit copying.
|
inlineprivate |
Definition at line 1649 of file schema.h.
|
inlineprivate |
Definition at line 1632 of file schema.h.
|
inlineprivate |
Definition at line 1715 of file schema.h.
|
inline |
|
inlineprivate |
Definition at line 1708 of file schema.h.
|
inlineprivate |
|
inline |
|
inlineprivate |
Definition at line 1661 of file schema.h.
|
private |
Prohibit assignment.
|
friend |
|
friend |
|
private |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |