cphot 0.1
A C++ tool for computing photometry from spectra.
GenericSchemaDocument< ValueT, Allocator > Class Template Reference

JSON schema document. More...

#include <fwd.h>

Public Types

typedef ValueT ValueType
 
typedef IGenericRemoteSchemaDocumentProvider< GenericSchemaDocumentIRemoteSchemaDocumentProviderType
 
typedef Allocator AllocatorType
 
typedef ValueType::EncodingType EncodingType
 
typedef EncodingType::Ch Ch
 
typedef internal::Schema< GenericSchemaDocumentSchemaType
 
typedef GenericPointer< ValueType, AllocatorPointerType
 

Public Member Functions

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

Friends

class internal::Schema< GenericSchemaDocument >
 
template<typename , typename , typename >
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.

Definition at line 136 of file fwd.h.

Member Typedef Documentation

◆ AllocatorType

template<typename ValueT , typename Allocator = CrtAllocator>
typedef Allocator GenericSchemaDocument< ValueT, Allocator >::AllocatorType

Definition at line 1324 of file schema.h.

◆ Ch

template<typename ValueT , typename Allocator = CrtAllocator>
typedef EncodingType::Ch GenericSchemaDocument< ValueT, Allocator >::Ch

Definition at line 1326 of file schema.h.

◆ EncodingType

template<typename ValueT , typename Allocator = CrtAllocator>
typedef ValueType::EncodingType GenericSchemaDocument< ValueT, Allocator >::EncodingType

Definition at line 1325 of file schema.h.

◆ IRemoteSchemaDocumentProviderType

template<typename ValueT , typename Allocator = CrtAllocator>
typedef IGenericRemoteSchemaDocumentProvider<GenericSchemaDocument> GenericSchemaDocument< ValueT, Allocator >::IRemoteSchemaDocumentProviderType

Definition at line 1323 of file schema.h.

◆ PointerType

template<typename ValueT , typename Allocator = CrtAllocator>
typedef GenericPointer<ValueType, Allocator> GenericSchemaDocument< ValueT, Allocator >::PointerType

Definition at line 1328 of file schema.h.

◆ SchemaType

template<typename ValueT , typename Allocator = CrtAllocator>
typedef internal::Schema<GenericSchemaDocument> GenericSchemaDocument< ValueT, Allocator >::SchemaType

Definition at line 1327 of file schema.h.

◆ ValueType

template<typename ValueT , typename Allocator = CrtAllocator>
typedef ValueT GenericSchemaDocument< ValueT, Allocator >::ValueType

Definition at line 1322 of file schema.h.

Constructor & Destructor Documentation

◆ GenericSchemaDocument()

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

Constructor.

Compile a JSON document into schema document.

Parameters
documentA JSON document as source.
remoteProviderAn optional remote schema document provider for resolving remote reference. Can be null.
allocatorAn optional allocator instance for allocating memory. Can be null.

Definition at line 1341 of file schema.h.

◆ ~GenericSchemaDocument()

template<typename ValueT , typename Allocator = CrtAllocator>
GenericSchemaDocument< ValueT, Allocator >::~GenericSchemaDocument ( )
inline

Destructor.

Definition at line 1393 of file schema.h.

Member Function Documentation

◆ GetRoot()

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

Get the root schema.

Definition at line 1401 of file schema.h.

Friends And Related Function Documentation

◆ GenericSchemaValidator

template<typename ValueT , typename Allocator = CrtAllocator>
template<typename , typename , typename >
friend class GenericSchemaValidator
friend

Definition at line 1331 of file schema.h.

◆ internal::Schema< GenericSchemaDocument >

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

Definition at line 1329 of file schema.h.


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