VR-Vantage 3.0 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
GenericSchemaDocument< ValueT, Allocator > Class Template Reference

JSON schema document. More...

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

Public Member Functions

 GenericSchemaDocument (const ValueType &document, IRemoteSchemaDocumentProviderType *remoteProvider=0, Allocator *allocator=0)
 Constructor.
 ~GenericSchemaDocument ()
 Destructor.
const SchemaTypeGetRoot () const
 Get the root schema.

Private Member Functions

 GenericSchemaDocument (const GenericSchemaDocument &)
 Prohibit copying.
GenericSchemaDocumentoperator= (const GenericSchemaDocument &)
 Prohibit assignment.
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 SchemaTypeGetSchema (const PointerType &pointer) const
PointerType GetPointer (const SchemaType *schema) const

Private Attributes

IRemoteSchemaDocumentProviderTyperemoteProvider_
Allocator * allocator_
Allocator * ownAllocator_
const SchemaTyperoot_
 Root schema.
internal::Stack< Allocator > schemaMap_
internal::Stack< Allocator > schemaRef_

Static Private Attributes

static const size_t kInitialSchemaMapSize = 64
static const size_t kInitialSchemaRefSize = 64

Friends

class internal::Schema< GenericSchemaDocument >
class GenericSchemaValidator

Detailed Description

template<typename ValueT, typename Allocator = CrtAllocator>
class 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.

Note
This is an immutable class (i.e. its instance cannot be modified after construction).
Template Parameters
ValueTType of JSON value (e.g. Value ), which also determine the encoding.
AllocatorAllocator type for allocating memory of this document.

Member Typedef Documentation

template<typename ValueT , typename Allocator = CrtAllocator>
typedef ValueT GenericSchemaDocument< ValueT, Allocator >::ValueType
template<typename ValueT , typename Allocator = CrtAllocator>
typedef IGenericRemoteSchemaDocumentProvider<GenericSchemaDocument> GenericSchemaDocument< ValueT, Allocator >::IRemoteSchemaDocumentProviderType
template<typename ValueT , typename Allocator = CrtAllocator>
typedef Allocator GenericSchemaDocument< ValueT, Allocator >::AllocatorType
template<typename ValueT , typename Allocator = CrtAllocator>
typedef ValueType::EncodingType GenericSchemaDocument< ValueT, Allocator >::EncodingType
template<typename ValueT , typename Allocator = CrtAllocator>
typedef EncodingType::Ch GenericSchemaDocument< ValueT, Allocator >::Ch
template<typename ValueT , typename Allocator = CrtAllocator>
typedef internal::Schema<GenericSchemaDocument> GenericSchemaDocument< ValueT, Allocator >::SchemaType
template<typename ValueT , typename Allocator = CrtAllocator>
typedef GenericPointer<ValueType, Allocator> GenericSchemaDocument< ValueT, Allocator >::PointerType

Constructor & Destructor Documentation

template<typename ValueT , typename Allocator = CrtAllocator>
GenericSchemaDocument< ValueT, Allocator >::GenericSchemaDocument ( const ValueType document,
IRemoteSchemaDocumentProviderType remoteProvider = 0,
Allocator *  allocator = 0 
)
inlineexplicit
template<typename ValueT , typename Allocator = CrtAllocator>
GenericSchemaDocument< ValueT, Allocator >::~GenericSchemaDocument ( )
inline
template<typename ValueT , typename Allocator = CrtAllocator>
GenericSchemaDocument< ValueT, Allocator >::GenericSchemaDocument ( const GenericSchemaDocument< ValueT, Allocator > &  )
private

Prohibit copying.

Member Function Documentation

template<typename ValueT , typename Allocator = CrtAllocator>
const SchemaType& GenericSchemaDocument< ValueT, Allocator >::GetRoot ( ) const
inline

Get the root schema.

References GenericSchemaDocument< ValueT, Allocator >::root_.

template<typename ValueT , typename Allocator = CrtAllocator>
GenericSchemaDocument& GenericSchemaDocument< ValueT, Allocator >::operator= ( const GenericSchemaDocument< ValueT, Allocator > &  )
private

Prohibit assignment.

template<typename ValueT , typename Allocator = CrtAllocator>
void GenericSchemaDocument< ValueT, Allocator >::CreateSchemaRecursive ( const SchemaType **  schema,
const PointerType pointer,
const ValueType v,
const ValueType document 
)
inlineprivate
template<typename ValueT , typename Allocator = CrtAllocator>
void GenericSchemaDocument< ValueT, Allocator >::CreateSchema ( const SchemaType **  schema,
const PointerType pointer,
const ValueType v,
const ValueType document 
)
inlineprivate
template<typename ValueT , typename Allocator = CrtAllocator>
bool GenericSchemaDocument< ValueT, Allocator >::HandleRefSchema ( const PointerType source,
const SchemaType **  schema,
const ValueType v,
const ValueType document 
)
inlineprivate
template<typename ValueT , typename Allocator = CrtAllocator>
const SchemaType* GenericSchemaDocument< ValueT, Allocator >::GetSchema ( const PointerType pointer) const
inlineprivate
template<typename ValueT , typename Allocator = CrtAllocator>
PointerType GenericSchemaDocument< ValueT, Allocator >::GetPointer ( const SchemaType schema) const
inlineprivate

Friends And Related Function Documentation

template<typename ValueT , typename Allocator = CrtAllocator>
friend class internal::Schema< GenericSchemaDocument >
friend
template<typename ValueT , typename Allocator = CrtAllocator>
friend class GenericSchemaValidator
friend

Member Data Documentation

template<typename ValueT , typename Allocator = CrtAllocator>
const size_t GenericSchemaDocument< ValueT, Allocator >::kInitialSchemaMapSize = 64
staticprivate
template<typename ValueT , typename Allocator = CrtAllocator>
const size_t GenericSchemaDocument< ValueT, Allocator >::kInitialSchemaRefSize = 64
staticprivate
template<typename ValueT , typename Allocator = CrtAllocator>
IRemoteSchemaDocumentProviderType* GenericSchemaDocument< ValueT, Allocator >::remoteProvider_
private
template<typename ValueT , typename Allocator = CrtAllocator>
Allocator* GenericSchemaDocument< ValueT, Allocator >::allocator_
private
template<typename ValueT , typename Allocator = CrtAllocator>
Allocator* GenericSchemaDocument< ValueT, Allocator >::ownAllocator_
private
template<typename ValueT , typename Allocator = CrtAllocator>
const SchemaType* GenericSchemaDocument< ValueT, Allocator >::root_
private
template<typename ValueT , typename Allocator = CrtAllocator>
internal::Stack<Allocator> GenericSchemaDocument< ValueT, Allocator >::schemaMap_
private
template<typename ValueT , typename Allocator = CrtAllocator>
internal::Stack<Allocator> GenericSchemaDocument< ValueT, Allocator >::schemaRef_
private

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


Copyright © 2005-2022 MAK Technologies. All Rights Reserved (www.mak.com)