Torque3D Documentation / _generateds / GenericSchemaDocument

GenericSchemaDocument

Engine/source/persistence/rapidjson/schema.h

JSON schema document.

More...

Classes:

Public Types

AllocatorType 
EncodingType::Ch
Ch 
ValueType::EncodingType
EncodingType 
IRemoteSchemaDocumentProviderType 
ValueT
ValueType 

Private Static Attributes

Public Functions

GenericSchemaDocument(const ValueType & document, const Ch * uri, SizeType uriLength, IRemoteSchemaDocumentProviderType * remoteProvider, Allocator * allocator)

Constructor.

Get the root schema.

Detailed Description

JSON schema document.

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

note:

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

Parameters:
ValueT

Type of JSON value (e.g.

Value
), which also determine the encoding.

Allocator

Allocator type for allocating memory of this document.

Public Types

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

Public Friends

Private Static Attributes

const size_t kInitialSchemaMapSize 
const size_t kInitialSchemaRefSize 

Private Attributes

Allocator * allocator_ 
Allocator * ownAllocator_ 
IRemoteSchemaDocumentProviderType * remoteProvider_ 
const SchemaType * root_ 

Root schema.

internal::Stack< Allocator > schemaMap_ 
internal::Stack< Allocator > schemaRef_ 
SchemaType * typeless_ 
URIType uri_ 

Public Functions

GenericSchemaDocument(const ValueType & document, const Ch * uri, SizeType uriLength, IRemoteSchemaDocumentProviderType * remoteProvider, Allocator * allocator)

Constructor.

Compile a JSON document into schema document.

Parameters:

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.

~GenericSchemaDocument()

Destructor.

GetRoot()

Get the root schema.

GetURI()