Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator > Class Template Reference

JSON Schema Validator. More...

#include <fwd.h>

Inheritance diagram for GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >:
internal::ISchemaStateFactory< SchemaDocumentType::SchemaType > internal::ISchemaValidator internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >

Public Types

typedef SchemaDocumentType::SchemaType SchemaType
 
typedef SchemaDocumentType::PointerType PointerType
 
typedef SchemaType::EncodingType EncodingType
 
typedef SchemaType::SValue SValue
 
typedef EncodingType::Ch Ch
 
typedef GenericStringRef< ChStringRefType
 
typedef GenericValue< EncodingType, StateAllocator > ValueType
 
- Public Types inherited from internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >
typedef SchemaDocumentType::SchemaType::Ch Ch
 
typedef SchemaDocumentType::SchemaType::SValue SValue
 

Public Member Functions

 GenericSchemaValidator (const SchemaDocumentType &schemaDocument, StateAllocator *allocator=0, size_t schemaStackCapacity=kDefaultSchemaStackCapacity, size_t documentStackCapacity=kDefaultDocumentStackCapacity)
 Constructor without output handler. More...
 
 GenericSchemaValidator (const SchemaDocumentType &schemaDocument, OutputHandler &outputHandler, StateAllocator *allocator=0, size_t schemaStackCapacity=kDefaultSchemaStackCapacity, size_t documentStackCapacity=kDefaultDocumentStackCapacity)
 Constructor with output handler. More...
 
 ~GenericSchemaValidator ()
 Destructor. More...
 
void Reset ()
 Reset the internal states. More...
 
virtual bool IsValid () const
 Checks whether the current state is valid. More...
 
ValueTypeGetError ()
 Gets the error object. More...
 
const ValueTypeGetError () const
 
PointerType GetInvalidSchemaPointer () const
 Gets the JSON pointer pointed to the invalid schema. More...
 
const ChGetInvalidSchemaKeyword () const
 Gets the keyword of invalid schema. More...
 
PointerType GetInvalidDocumentPointer () const
 Gets the JSON pointer pointed to the invalid value. More...
 
void NotMultipleOf (int64_t actual, const SValue &expected)
 
void NotMultipleOf (uint64_t actual, const SValue &expected)
 
void NotMultipleOf (double actual, const SValue &expected)
 
void AboveMaximum (int64_t actual, const SValue &expected, bool exclusive)
 
void AboveMaximum (uint64_t actual, const SValue &expected, bool exclusive)
 
void AboveMaximum (double actual, const SValue &expected, bool exclusive)
 
void BelowMinimum (int64_t actual, const SValue &expected, bool exclusive)
 
void BelowMinimum (uint64_t actual, const SValue &expected, bool exclusive)
 
void BelowMinimum (double actual, const SValue &expected, bool exclusive)
 
void TooLong (const Ch *str, SizeType length, SizeType expected)
 
void TooShort (const Ch *str, SizeType length, SizeType expected)
 
void DoesNotMatch (const Ch *str, SizeType length)
 
void DisallowedItem (SizeType index)
 
void TooFewItems (SizeType actualCount, SizeType expectedCount)
 
void TooManyItems (SizeType actualCount, SizeType expectedCount)
 
void DuplicateItems (SizeType index1, SizeType index2)
 
void TooManyProperties (SizeType actualCount, SizeType expectedCount)
 
void TooFewProperties (SizeType actualCount, SizeType expectedCount)
 
void StartMissingProperties ()
 
void AddMissingProperty (const SValue &name)
 
bool EndMissingProperties ()
 
void PropertyViolations (ISchemaValidator **subvalidators, SizeType count)
 
void DisallowedProperty (const Ch *name, SizeType length)
 
void StartDependencyErrors ()
 
void StartMissingDependentProperties ()
 
void AddMissingDependentProperty (const SValue &targetName)
 
void EndMissingDependentProperties (const SValue &sourceName)
 
void AddDependencySchemaError (const SValue &sourceName, ISchemaValidator *subvalidator)
 
bool EndDependencyErrors ()
 
void DisallowedValue ()
 
void StartDisallowedType ()
 
void AddExpectedType (const typename SchemaType::ValueType &expectedType)
 
void EndDisallowedType (const typename SchemaType::ValueType &actualType)
 
void NotAllOf (ISchemaValidator **subvalidators, SizeType count)
 
void NoneOf (ISchemaValidator **subvalidators, SizeType count)
 
void NotOneOf (ISchemaValidator **subvalidators, SizeType count)
 
void Disallowed ()
 
bool Null ()
 
bool Bool (bool b)
 
bool Int (int i)
 
bool Uint (unsigned u)
 
bool Int64 (int64_t i)
 
bool Uint64 (uint64_t u)
 
bool Double (double d)
 
bool RawNumber (const Ch *str, SizeType length, bool copy)
 
bool String (const Ch *str, SizeType length, bool copy)
 
bool StartObject ()
 
bool Key (const Ch *str, SizeType len, bool copy)
 
bool EndObject (SizeType memberCount)
 
bool StartArray ()
 
bool EndArray (SizeType elementCount)
 
virtual ISchemaValidator * CreateSchemaValidator (const SchemaType &root)
 
virtual void DestroySchemaValidator (ISchemaValidator *validator)
 
virtual void * CreateHasher ()
 
virtual uint64_t GetHashCode (void *hasher)
 
virtual void DestroryHasher (void *hasher)
 
virtual void * MallocState (size_t size)
 
virtual void FreeState (void *p)
 
- Public Member Functions inherited from internal::ISchemaStateFactory< SchemaDocumentType::SchemaType >
virtual ~ISchemaStateFactory ()
 
virtual void DestroySchemaValidator (ISchemaValidator *validator)=0
 
- Public Member Functions inherited from internal::ISchemaValidator
virtual ~ISchemaValidator ()
 
- Public Member Functions inherited from internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >
virtual ~IValidationErrorHandler ()
 
virtual void NotMultipleOf (int64_t actual, const SValue &expected)=0
 
virtual void NotMultipleOf (uint64_t actual, const SValue &expected)=0
 
virtual void NotMultipleOf (double actual, const SValue &expected)=0
 
virtual void AboveMaximum (int64_t actual, const SValue &expected, bool exclusive)=0
 
virtual void AboveMaximum (uint64_t actual, const SValue &expected, bool exclusive)=0
 
virtual void AboveMaximum (double actual, const SValue &expected, bool exclusive)=0
 
virtual void BelowMinimum (int64_t actual, const SValue &expected, bool exclusive)=0
 
virtual void BelowMinimum (uint64_t actual, const SValue &expected, bool exclusive)=0
 
virtual void BelowMinimum (double actual, const SValue &expected, bool exclusive)=0
 
virtual void TooLong (const Ch *str, SizeType length, SizeType expected)=0
 
virtual void TooShort (const Ch *str, SizeType length, SizeType expected)=0
 
virtual void DoesNotMatch (const Ch *str, SizeType length)=0
 
virtual void AddMissingProperty (const SValue &name)=0
 
virtual void PropertyViolations (ISchemaValidator **subvalidators, SizeType count)=0
 
virtual void DisallowedProperty (const Ch *name, SizeType length)=0
 
virtual void AddMissingDependentProperty (const SValue &targetName)=0
 
virtual void EndMissingDependentProperties (const SValue &sourceName)=0
 
virtual void AddDependencySchemaError (const SValue &souceName, ISchemaValidator *subvalidator)=0
 
virtual void AddExpectedType (const typename SchemaDocumentType::SchemaType::ValueType &expectedType)=0
 
virtual void EndDisallowedType (const typename SchemaDocumentType::SchemaType::ValueType &actualType)=0
 
virtual void NotAllOf (ISchemaValidator **subvalidators, SizeType count)=0
 
virtual void NoneOf (ISchemaValidator **subvalidators, SizeType count)=0
 
virtual void NotOneOf (ISchemaValidator **subvalidators, SizeType count)=0
 

Private Types

typedef SchemaType::Context Context
 
typedef GenericValue< UTF8<>, StateAllocator > HashCodeArray
 
typedef internal::Hasher< EncodingType, StateAllocator > HasherType
 

Private Member Functions

 GenericSchemaValidator (const SchemaDocumentType &schemaDocument, const SchemaType &root, const char *basePath, size_t basePathSize, StateAllocator *allocator=0, size_t schemaStackCapacity=kDefaultSchemaStackCapacity, size_t documentStackCapacity=kDefaultDocumentStackCapacity)
 
StateAllocator & GetStateAllocator ()
 
bool BeginValue ()
 
bool EndValue ()
 
void AppendToken (const Ch *str, SizeType len)
 
RAPIDJSON_FORCEINLINE void PushSchema (const SchemaType &schema)
 
RAPIDJSON_FORCEINLINE void PopSchema ()
 
void AddErrorLocation (ValueType &result, bool parent)
 
void AddError (ValueType &keyword, ValueType &error)
 
void AddCurrentError (const typename SchemaType::ValueType &keyword, bool parent=false)
 
void MergeError (ValueType &other)
 
void AddNumberError (const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
 
void AddErrorArray (const typename SchemaType::ValueType &keyword, ISchemaValidator **subvalidators, SizeType count)
 
const SchemaTypeCurrentSchema () const
 
ContextCurrentContext ()
 
const ContextCurrentContext () const
 

Private Attributes

const SchemaDocumentType * schemaDocument_
 
const SchemaTyperoot_
 
StateAllocator * stateAllocator_
 
StateAllocator * ownStateAllocator_
 
internal::Stack< StateAllocator > schemaStack_
 stack to store the current path of schema (BaseSchemaType *) More...
 
internal::Stack< StateAllocator > documentStack_
 stack to store the current path of validating document (Ch) More...
 
OutputHandler * outputHandler_
 
ValueType error_
 
ValueType currentError_
 
ValueType missingDependents_
 
bool valid_
 

Static Private Attributes

static const size_t kDefaultSchemaStackCapacity = 1024
 
static const size_t kDefaultDocumentStackCapacity = 256
 

Detailed Description

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
class GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >

JSON Schema Validator.

A SAX style JSON schema validator. It uses a GenericSchemaDocument to validate SAX events. It delegates the incoming SAX events to an output handler. The default output handler does nothing. It can be reused multiple times by calling Reset().

Template Parameters
SchemaDocumentTypeType of schema document.
OutputHandlerType of output handler. Default handler does nothing.
StateAllocatorAllocator for storing the internal validation states.

Definition at line 145 of file fwd.h.

Member Typedef Documentation

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef EncodingType::Ch GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Ch

Definition at line 1771 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef SchemaType::Context GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Context
private

Definition at line 2190 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef SchemaType::EncodingType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EncodingType

Definition at line 1769 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef GenericValue<UTF8<>, StateAllocator> GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::HashCodeArray
private

Definition at line 2191 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef internal::Hasher<EncodingType, StateAllocator> GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::HasherType
private

Definition at line 2192 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef SchemaDocumentType::PointerType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::PointerType

Definition at line 1768 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef SchemaDocumentType::SchemaType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::SchemaType

Definition at line 1767 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef GenericStringRef<Ch> GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StringRefType

Definition at line 1772 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef SchemaType::SValue GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::SValue

Definition at line 1770 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
typedef GenericValue<EncodingType, StateAllocator> GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::ValueType

Definition at line 1773 of file schema.h.

Constructor & Destructor Documentation

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GenericSchemaValidator ( const SchemaDocumentType &  schemaDocument,
StateAllocator *  allocator = 0,
size_t  schemaStackCapacity = kDefaultSchemaStackCapacity,
size_t  documentStackCapacity = kDefaultDocumentStackCapacity 
)
inline

Constructor without output handler.

Parameters
schemaDocumentThe schema document to conform to.
allocatorOptional allocator for storing internal validation states.
schemaStackCapacityOptional initial capacity of schema path stack.
documentStackCapacityOptional initial capacity of document path stack.

Definition at line 1782 of file schema.h.

1787  :
1788  schemaDocument_(&schemaDocument),
1789  root_(schemaDocument.GetRoot()),
1790  stateAllocator_(allocator),
1791  ownStateAllocator_(0),
1792  schemaStack_(allocator, schemaStackCapacity),
1793  documentStack_(allocator, documentStackCapacity),
1794  outputHandler_(0),
1796  currentError_(),
1798  valid_(true)
1799 #if RAPIDJSON_SCHEMA_VERBOSE
1800  , depth_(0)
1801 #endif
1802  {
1803  }
object
Definition: rapidjson.h:622
StateAllocator * stateAllocator_
Definition: schema.h:2400
StateAllocator * ownStateAllocator_
Definition: schema.h:2401
internal::Stack< StateAllocator > documentStack_
stack to store the current path of validating document (Ch)
Definition: schema.h:2403
ValueType missingDependents_
Definition: schema.h:2407
OutputHandler * outputHandler_
Definition: schema.h:2404
const SchemaDocumentType * schemaDocument_
Definition: schema.h:2398
ValueType currentError_
Definition: schema.h:2406
const SchemaType & root_
Definition: schema.h:2399
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GenericSchemaValidator ( const SchemaDocumentType &  schemaDocument,
OutputHandler &  outputHandler,
StateAllocator *  allocator = 0,
size_t  schemaStackCapacity = kDefaultSchemaStackCapacity,
size_t  documentStackCapacity = kDefaultDocumentStackCapacity 
)
inline

Constructor with output handler.

Parameters
schemaDocumentThe schema document to conform to.
allocatorOptional allocator for storing internal validation states.
schemaStackCapacityOptional initial capacity of schema path stack.
documentStackCapacityOptional initial capacity of document path stack.

Definition at line 1812 of file schema.h.

1818  :
1819  schemaDocument_(&schemaDocument),
1820  root_(schemaDocument.GetRoot()),
1821  stateAllocator_(allocator),
1822  ownStateAllocator_(0),
1823  schemaStack_(allocator, schemaStackCapacity),
1824  documentStack_(allocator, documentStackCapacity),
1825  outputHandler_(&outputHandler),
1827  currentError_(),
1829  valid_(true)
1830 #if RAPIDJSON_SCHEMA_VERBOSE
1831  , depth_(0)
1832 #endif
1833  {
1834  }
object
Definition: rapidjson.h:622
StateAllocator * stateAllocator_
Definition: schema.h:2400
StateAllocator * ownStateAllocator_
Definition: schema.h:2401
internal::Stack< StateAllocator > documentStack_
stack to store the current path of validating document (Ch)
Definition: schema.h:2403
ValueType missingDependents_
Definition: schema.h:2407
OutputHandler * outputHandler_
Definition: schema.h:2404
const SchemaDocumentType * schemaDocument_
Definition: schema.h:2398
ValueType currentError_
Definition: schema.h:2406
const SchemaType & root_
Definition: schema.h:2399
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::~GenericSchemaValidator ( )
inline

Destructor.

Definition at line 1837 of file schema.h.

1837  {
1838  Reset();
1840  }
StateAllocator * ownStateAllocator_
Definition: schema.h:2401
void Reset()
Reset the internal states.
Definition: schema.h:1843
#define RAPIDJSON_DELETE(x)
! customization point for global delete
Definition: rapidjson.h:605
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GenericSchemaValidator ( const SchemaDocumentType &  schemaDocument,
const SchemaType root,
const char *  basePath,
size_t  basePathSize,
StateAllocator *  allocator = 0,
size_t  schemaStackCapacity = kDefaultSchemaStackCapacity,
size_t  documentStackCapacity = kDefaultDocumentStackCapacity 
)
inlineprivate

Definition at line 2194 of file schema.h.

2204  :
2205  schemaDocument_(&schemaDocument),
2206  root_(root),
2207  stateAllocator_(allocator),
2208  ownStateAllocator_(0),
2209  schemaStack_(allocator, schemaStackCapacity),
2210  documentStack_(allocator, documentStackCapacity),
2211  outputHandler_(0),
2213  currentError_(),
2215  valid_(true)
2216 #if RAPIDJSON_SCHEMA_VERBOSE
2217  , depth_(depth)
2218 #endif
2219  {
2220  if (basePath && basePathSize)
2221  memcpy(documentStack_.template Push<char>(basePathSize), basePath, basePathSize);
2222  }
object
Definition: rapidjson.h:622
StateAllocator * stateAllocator_
Definition: schema.h:2400
StateAllocator * ownStateAllocator_
Definition: schema.h:2401
internal::Stack< StateAllocator > documentStack_
stack to store the current path of validating document (Ch)
Definition: schema.h:2403
ValueType missingDependents_
Definition: schema.h:2407
OutputHandler * outputHandler_
Definition: schema.h:2404
const SchemaDocumentType * schemaDocument_
Definition: schema.h:2398
ValueType currentError_
Definition: schema.h:2406
const SchemaType & root_
Definition: schema.h:2399
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402

Member Function Documentation

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AboveMaximum ( int64_t  actual,
const SValue expected,
bool  exclusive 
)
inline

Definition at line 1890 of file schema.h.

1890  {
1891  AddNumberError(SchemaType::GetMaximumString(), ValueType(actual).Move(), expected,
1892  exclusive ? &SchemaType::GetExclusiveMaximumString : 0);
1893  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AboveMaximum ( uint64_t  actual,
const SValue expected,
bool  exclusive 
)
inline

Definition at line 1894 of file schema.h.

1894  {
1895  AddNumberError(SchemaType::GetMaximumString(), ValueType(actual).Move(), expected,
1896  exclusive ? &SchemaType::GetExclusiveMaximumString : 0);
1897  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AboveMaximum ( double  actual,
const SValue expected,
bool  exclusive 
)
inline

Definition at line 1898 of file schema.h.

1898  {
1899  AddNumberError(SchemaType::GetMaximumString(), ValueType(actual).Move(), expected,
1900  exclusive ? &SchemaType::GetExclusiveMaximumString : 0);
1901  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddCurrentError ( const typename SchemaType::ValueType &  keyword,
bool  parent = false 
)
inlineprivate

Definition at line 2361 of file schema.h.

2361  {
2363  AddError(ValueType(keyword, GetStateAllocator(), false).Move(), currentError_);
2364  }
void AddErrorLocation(ValueType &result, bool parent)
Definition: schema.h:2328
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
void AddError(ValueType &keyword, ValueType &error)
Definition: schema.h:2347
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
def parent(G, child, parent_type)
Definition: graph.py:67
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddDependencySchemaError ( const SValue sourceName,
ISchemaValidator *  subvalidator 
)
inline

Definition at line 1998 of file schema.h.

1998  {
1999  currentError_.AddMember(ValueType(sourceName, GetStateAllocator()).Move(),
2000  static_cast<GenericSchemaValidator*>(subvalidator)->GetError(), GetStateAllocator());
2001  }
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
ValueType & GetError()
Gets the error object.
Definition: schema.h:1858
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddError ( ValueType keyword,
ValueType error 
)
inlineprivate

Definition at line 2347 of file schema.h.

2347  {
2348  typename ValueType::MemberIterator member = error_.FindMember(keyword);
2349  if (member == error_.MemberEnd())
2350  error_.AddMember(keyword, error, GetStateAllocator());
2351  else {
2352  if (member->value.IsObject()) {
2353  ValueType errors(kArrayType);
2354  errors.PushBack(member->value, GetStateAllocator());
2355  member->value = errors;
2356  }
2357  member->value.PushBack(error, GetStateAllocator());
2358  }
2359  }
array
Definition: rapidjson.h:623
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
error
Definition: include.cc:26
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
GenericMemberIterator< false, EncodingType, StateAllocator >::Iterator MemberIterator
Member iterator for iterating in object.
Definition: document.h:583
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddErrorArray ( const typename SchemaType::ValueType &  keyword,
ISchemaValidator **  subvalidators,
SizeType  count 
)
inlineprivate

Definition at line 2382 of file schema.h.

2383  {
2384  ValueType errors(kArrayType);
2385  for (SizeType i = 0; i < count; ++i)
2386  errors.PushBack(static_cast<GenericSchemaValidator*>(subvalidators[i])->GetError(), GetStateAllocator());
2387  currentError_.SetObject();
2388  currentError_.AddMember(GetErrorsString(), errors, GetStateAllocator());
2389  AddCurrentError(keyword);
2390  }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:384
array
Definition: rapidjson.h:623
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddErrorLocation ( ValueType result,
bool  parent 
)
inlineprivate

Definition at line 2328 of file schema.h.

2328  {
2330  PointerType instancePointer = GetInvalidDocumentPointer();
2331  ((parent && instancePointer.GetTokenCount() > 0)
2332  ? PointerType(instancePointer.GetTokens(), instancePointer.GetTokenCount() - 1)
2333  : instancePointer).StringifyUriFragment(sb);
2334  ValueType instanceRef(sb.GetString(), static_cast<SizeType>(sb.GetSize() / sizeof(Ch)),
2335  GetStateAllocator());
2336  result.AddMember(GetInstanceRefString(), instanceRef, GetStateAllocator());
2337  sb.Clear();
2338  memcpy(sb.Push(CurrentSchema().GetURI().GetStringLength()),
2339  CurrentSchema().GetURI().GetString(),
2340  CurrentSchema().GetURI().GetStringLength() * sizeof(Ch));
2341  GetInvalidSchemaPointer().StringifyUriFragment(sb);
2342  ValueType schemaRef(sb.GetString(), static_cast<SizeType>(sb.GetSize() / sizeof(Ch)),
2343  GetStateAllocator());
2344  result.AddMember(GetSchemaRefString(), schemaRef, GetStateAllocator());
2345  }
size_t GetSize() const
Get the size of string in bytes in the string buffer.
Definition: stringbuffer.h:82
SchemaDocumentType::PointerType PointerType
Definition: schema.h:1768
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:384
static QCString result
const Ch * GetString() const
Definition: stringbuffer.h:73
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
Ch * Push(size_t count)
Definition: stringbuffer.h:69
PointerType GetInvalidSchemaPointer() const
Gets the JSON pointer pointed to the invalid schema.
Definition: schema.h:1862
PointerType GetInvalidDocumentPointer() const
Gets the JSON pointer pointed to the invalid value.
Definition: schema.h:1872
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
Represents an in-memory output stream.
Definition: fwd.h:59
EncodingType::Ch Ch
Definition: schema.h:1771
const SchemaType & CurrentSchema() const
Definition: schema.h:2392
def parent(G, child, parent_type)
Definition: graph.py:67
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddExpectedType ( const typename SchemaType::ValueType &  expectedType)
inline

Definition at line 2019 of file schema.h.

2019  {
2020  currentError_.PushBack(ValueType(expectedType, GetStateAllocator()).Move(), GetStateAllocator());
2021  }
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddMissingDependentProperty ( const SValue targetName)
inline

Definition at line 1990 of file schema.h.

1990  {
1991  missingDependents_.PushBack(ValueType(targetName, GetStateAllocator()).Move(), GetStateAllocator());
1992  }
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
ValueType missingDependents_
Definition: schema.h:2407
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddMissingProperty ( const SValue name)
inline

Definition at line 1962 of file schema.h.

1962  {
1964  }
static QCString name
Definition: declinfo.cpp:673
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddNumberError ( const typename SchemaType::ValueType &  keyword,
ValueType actual,
const SValue expected,
const typename SchemaType::ValueType &(*)()  exclusive = 0 
)
inlineprivate

Definition at line 2372 of file schema.h.

2373  {
2374  currentError_.SetObject();
2375  currentError_.AddMember(GetActualString(), actual, GetStateAllocator());
2376  currentError_.AddMember(GetExpectedString(), ValueType(expected, GetStateAllocator()).Move(), GetStateAllocator());
2377  if (exclusive)
2378  currentError_.AddMember(ValueType(exclusive(), GetStateAllocator()).Move(), true, GetStateAllocator());
2379  AddCurrentError(keyword);
2380  }
const char expected[]
Definition: Exception_t.cc:22
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AppendToken ( const Ch str,
SizeType  len 
)
inlineprivate

Definition at line 2300 of file schema.h.

2300  {
2301  documentStack_.template Reserve<Ch>(1 + len * 2); // worst case all characters are escaped as two characters
2302  *documentStack_.template PushUnsafe<Ch>() = '/';
2303  for (SizeType i = 0; i < len; i++) {
2304  if (str[i] == '~') {
2305  *documentStack_.template PushUnsafe<Ch>() = '~';
2306  *documentStack_.template PushUnsafe<Ch>() = '0';
2307  }
2308  else if (str[i] == '/') {
2309  *documentStack_.template PushUnsafe<Ch>() = '~';
2310  *documentStack_.template PushUnsafe<Ch>() = '1';
2311  }
2312  else
2313  *documentStack_.template PushUnsafe<Ch>() = str[i];
2314  }
2315  }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:384
internal::Stack< StateAllocator > documentStack_
stack to store the current path of validating document (Ch)
Definition: schema.h:2403
static QCString str
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::BeginValue ( )
inlineprivate

Definition at line 2230 of file schema.h.

2230  {
2231  if (schemaStack_.Empty())
2232  PushSchema(root_);
2233  else {
2234  if (CurrentContext().inArray)
2235  internal::TokenHelper<internal::Stack<StateAllocator>, Ch>::AppendIndexToken(documentStack_, CurrentContext().arrayElementIndex);
2236 
2237  if (!CurrentSchema().BeginValue(CurrentContext()))
2238  return false;
2239 
2240  SizeType count = CurrentContext().patternPropertiesSchemaCount;
2241  const SchemaType** sa = CurrentContext().patternPropertiesSchemas;
2242  typename Context::PatternValidatorType patternValidatorType = CurrentContext().valuePatternValidatorType;
2243  bool valueUniqueness = CurrentContext().valueUniqueness;
2244  RAPIDJSON_ASSERT(CurrentContext().valueSchema);
2245  PushSchema(*CurrentContext().valueSchema);
2246 
2247  if (count > 0) {
2248  CurrentContext().objectPatternValidatorType = patternValidatorType;
2249  ISchemaValidator**& va = CurrentContext().patternPropertiesValidators;
2250  SizeType& validatorCount = CurrentContext().patternPropertiesValidatorCount;
2251  va = static_cast<ISchemaValidator**>(MallocState(sizeof(ISchemaValidator*) * count));
2252  for (SizeType i = 0; i < count; i++)
2253  va[validatorCount++] = CreateSchemaValidator(*sa[i]);
2254  }
2255 
2256  CurrentContext().arrayUniqueness = valueUniqueness;
2257  }
2258  return true;
2259  }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:384
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406
SchemaDocumentType::SchemaType SchemaType
Definition: schema.h:1767
bool Empty() const
Definition: stack.h:176
internal::Stack< StateAllocator > documentStack_
stack to store the current path of validating document (Ch)
Definition: schema.h:2403
Context & CurrentContext()
Definition: schema.h:2393
virtual void * MallocState(size_t size)
Definition: schema.h:2181
const SchemaType & root_
Definition: schema.h:2399
EncodingType::Ch Ch
Definition: schema.h:1771
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
const SchemaType & CurrentSchema() const
Definition: schema.h:2392
RAPIDJSON_FORCEINLINE void PushSchema(const SchemaType &schema)
Definition: schema.h:2317
virtual ISchemaValidator * CreateSchemaValidator(const SchemaType &root)
Definition: schema.h:2153
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::BelowMinimum ( int64_t  actual,
const SValue expected,
bool  exclusive 
)
inline

Definition at line 1902 of file schema.h.

1902  {
1903  AddNumberError(SchemaType::GetMinimumString(), ValueType(actual).Move(), expected,
1904  exclusive ? &SchemaType::GetExclusiveMinimumString : 0);
1905  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::BelowMinimum ( uint64_t  actual,
const SValue expected,
bool  exclusive 
)
inline

Definition at line 1906 of file schema.h.

1906  {
1907  AddNumberError(SchemaType::GetMinimumString(), ValueType(actual).Move(), expected,
1908  exclusive ? &SchemaType::GetExclusiveMinimumString : 0);
1909  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::BelowMinimum ( double  actual,
const SValue expected,
bool  exclusive 
)
inline

Definition at line 1910 of file schema.h.

1910  {
1911  AddNumberError(SchemaType::GetMinimumString(), ValueType(actual).Move(), expected,
1912  exclusive ? &SchemaType::GetExclusiveMinimumString : 0);
1913  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Bool ( bool  b)
inline

Definition at line 2102 of file schema.h.

#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition: schema.h:2096
Context & CurrentContext()
Definition: schema.h:2393
static bool * b
Definition: config.cpp:1043
bool Bool(bool b)
Definition: schema.h:2102
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual void* GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::CreateHasher ( )
inlinevirtual

Implements internal::ISchemaStateFactory< SchemaDocumentType::SchemaType >.

Definition at line 2167 of file schema.h.

2167  {
2168  return new (GetStateAllocator().Malloc(sizeof(HasherType))) HasherType(&GetStateAllocator());
2169  }
internal::Hasher< EncodingType, StateAllocator > HasherType
Definition: schema.h:2192
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual ISchemaValidator* GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::CreateSchemaValidator ( const SchemaType root)
inlinevirtual

Implements internal::ISchemaStateFactory< SchemaDocumentType::SchemaType >.

Definition at line 2153 of file schema.h.

2153  {
2154  return new (GetStateAllocator().Malloc(sizeof(GenericSchemaValidator))) GenericSchemaValidator(*schemaDocument_, root, documentStack_.template Bottom<char>(), documentStack_.GetSize(),
2155 #if RAPIDJSON_SCHEMA_VERBOSE
2156  depth_ + 1,
2157 #endif
2158  &GetStateAllocator());
2159  }
internal::Stack< StateAllocator > documentStack_
stack to store the current path of validating document (Ch)
Definition: schema.h:2403
const SchemaDocumentType * schemaDocument_
Definition: schema.h:2398
size_t GetSize() const
Definition: stack.h:177
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
GenericSchemaValidator(const SchemaDocumentType &schemaDocument, StateAllocator *allocator=0, size_t schemaStackCapacity=kDefaultSchemaStackCapacity, size_t documentStackCapacity=kDefaultDocumentStackCapacity)
Constructor without output handler.
Definition: schema.h:1782
JSON Schema Validator.
Definition: fwd.h:145
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
Context& GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::CurrentContext ( )
inlineprivate

Definition at line 2393 of file schema.h.

2393 { return *schemaStack_.template Top<Context>(); }
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
const Context& GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::CurrentContext ( ) const
inlineprivate

Definition at line 2394 of file schema.h.

2394 { return *schemaStack_.template Top<Context>(); }
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
const SchemaType& GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::CurrentSchema ( ) const
inlineprivate

Definition at line 2392 of file schema.h.

2392 { return *schemaStack_.template Top<Context>()->schema; }
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::DestroryHasher ( void *  hasher)
inlinevirtual

Implements internal::ISchemaStateFactory< SchemaDocumentType::SchemaType >.

Definition at line 2175 of file schema.h.

2175  {
2176  HasherType* h = static_cast<HasherType*>(hasher);
2177  h->~HasherType();
2178  StateAllocator::Free(h);
2179  }
internal::Hasher< EncodingType, StateAllocator > HasherType
Definition: schema.h:2192
h
training ###############################
Definition: train_cnn.py:186
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::DestroySchemaValidator ( ISchemaValidator *  validator)
inlinevirtual

Definition at line 2161 of file schema.h.

2161  {
2162  GenericSchemaValidator* v = static_cast<GenericSchemaValidator*>(validator);
2164  StateAllocator::Free(v);
2165  }
~GenericSchemaValidator()
Destructor.
Definition: schema.h:1837
JSON Schema Validator.
Definition: fwd.h:145
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Disallowed ( )
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 2040 of file schema.h.

2040  {
2041  currentError_.SetObject();
2042  AddCurrentError(SchemaType::GetNotString());
2043  }
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::DisallowedItem ( SizeType  index)
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1929 of file schema.h.

1929  {
1930  currentError_.SetObject();
1931  currentError_.AddMember(GetDisallowedString(), ValueType(index).Move(), GetStateAllocator());
1932  AddCurrentError(SchemaType::GetAdditionalItemsString(), true);
1933  }
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::DisallowedProperty ( const Ch name,
SizeType  length 
)
inline

Definition at line 1978 of file schema.h.

1978  {
1979  currentError_.SetObject();
1980  currentError_.AddMember(GetDisallowedString(), ValueType(name, length, GetStateAllocator()).Move(), GetStateAllocator());
1981  AddCurrentError(SchemaType::GetAdditionalPropertiesString(), true);
1982  }
static QCString name
Definition: declinfo.cpp:673
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::DisallowedValue ( )
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 2012 of file schema.h.

2012  {
2013  currentError_.SetObject();
2014  AddCurrentError(SchemaType::GetEnumString());
2015  }
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::DoesNotMatch ( const Ch str,
SizeType  length 
)
inline

Definition at line 1923 of file schema.h.

1923  {
1924  currentError_.SetObject();
1925  currentError_.AddMember(GetActualString(), ValueType(str, length, GetStateAllocator()).Move(), GetStateAllocator());
1926  AddCurrentError(SchemaType::GetPatternString());
1927  }
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
static QCString str
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Double ( double  d)
inline

Definition at line 2107 of file schema.h.

#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition: schema.h:2096
bool Double(double d)
Definition: schema.h:2107
Context & CurrentContext()
Definition: schema.h:2393
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::DuplicateItems ( SizeType  index1,
SizeType  index2 
)
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1942 of file schema.h.

1942  {
1943  ValueType duplicates(kArrayType);
1944  duplicates.PushBack(index1, GetStateAllocator());
1945  duplicates.PushBack(index2, GetStateAllocator());
1946  currentError_.SetObject();
1947  currentError_.AddMember(GetDuplicatesString(), duplicates, GetStateAllocator());
1948  AddCurrentError(SchemaType::GetUniqueItemsString(), true);
1949  }
array
Definition: rapidjson.h:623
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EndArray ( SizeType  elementCount)
inline

Definition at line 2140 of file schema.h.

2140  {
2141  if (!valid_) return false;
2143  if (!CurrentSchema().EndArray(CurrentContext(), elementCount)) return valid_ = false;
2144  RAPIDJSON_SCHEMA_HANDLE_END_(EndArray, (elementCount));
2145  }
bool EndArray(SizeType elementCount)
Definition: schema.h:2140
Context & CurrentContext()
Definition: schema.h:2393
#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)
Definition: schema.h:2081
const SchemaType & CurrentSchema() const
Definition: schema.h:2392
#define RAPIDJSON_SCHEMA_HANDLE_END_(method, arg2)
Definition: schema.h:2093
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EndDependencyErrors ( )
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 2002 of file schema.h.

2002  {
2003  if (currentError_.ObjectEmpty())
2004  return false;
2006  error.AddMember(GetErrorsString(), currentError_, GetStateAllocator());
2007  currentError_ = error;
2008  AddCurrentError(SchemaType::GetDependenciesString());
2009  return true;
2010  }
object
Definition: rapidjson.h:622
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
error
Definition: include.cc:26
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EndDisallowedType ( const typename SchemaType::ValueType &  actualType)
inline

Definition at line 2022 of file schema.h.

2022  {
2024  error.AddMember(GetExpectedString(), currentError_, GetStateAllocator());
2025  error.AddMember(GetActualString(), ValueType(actualType, GetStateAllocator()).Move(), GetStateAllocator());
2026  currentError_ = error;
2027  AddCurrentError(SchemaType::GetTypeString());
2028  }
object
Definition: rapidjson.h:622
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
error
Definition: include.cc:26
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EndMissingDependentProperties ( const SValue sourceName)
inline

Definition at line 1993 of file schema.h.

1993  {
1994  if (!missingDependents_.Empty())
1995  currentError_.AddMember(ValueType(sourceName, GetStateAllocator()).Move(),
1997  }
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
ValueType missingDependents_
Definition: schema.h:2407
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EndMissingProperties ( )
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1965 of file schema.h.

1965  {
1966  if (currentError_.Empty())
1967  return false;
1969  error.AddMember(GetMissingString(), currentError_, GetStateAllocator());
1970  currentError_ = error;
1971  AddCurrentError(SchemaType::GetRequiredString());
1972  return true;
1973  }
object
Definition: rapidjson.h:622
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
error
Definition: include.cc:26
void AddCurrentError(const typename SchemaType::ValueType &keyword, bool parent=false)
Definition: schema.h:2361
ValueType currentError_
Definition: schema.h:2406
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EndObject ( SizeType  memberCount)
inline

Definition at line 2127 of file schema.h.

2127  {
2128  if (!valid_) return false;
2130  if (!CurrentSchema().EndObject(CurrentContext(), memberCount)) return valid_ = false;
2131  RAPIDJSON_SCHEMA_HANDLE_END_(EndObject, (memberCount));
2132  }
Context & CurrentContext()
Definition: schema.h:2393
#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)
Definition: schema.h:2081
const SchemaType & CurrentSchema() const
Definition: schema.h:2392
#define RAPIDJSON_SCHEMA_HANDLE_END_(method, arg2)
Definition: schema.h:2093
bool EndObject(SizeType memberCount)
Definition: schema.h:2127
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EndValue ( )
inlineprivate

Definition at line 2261 of file schema.h.

2261  {
2263  return false;
2264 
2265 #if RAPIDJSON_SCHEMA_VERBOSE
2267  schemaDocument_->GetPointer(&CurrentSchema()).Stringify(sb);
2268 
2269  *documentStack_.template Push<Ch>() = '\0';
2270  documentStack_.template Pop<Ch>(1);
2271  internal::PrintValidatorPointers(depth_, sb.GetString(), documentStack_.template Bottom<Ch>());
2272 #endif
2273 
2274  uint64_t h = CurrentContext().arrayUniqueness ? static_cast<HasherType*>(CurrentContext().hasher)->GetHashCode() : 0;
2275 
2276  PopSchema();
2277 
2278  if (!schemaStack_.Empty()) {
2279  Context& context = CurrentContext();
2280  if (context.valueUniqueness) {
2281  HashCodeArray* a = static_cast<HashCodeArray*>(context.arrayElementHashCodes);
2282  if (!a)
2283  CurrentContext().arrayElementHashCodes = a = new (GetStateAllocator().Malloc(sizeof(HashCodeArray))) HashCodeArray(kArrayType);
2284  for (typename HashCodeArray::ConstValueIterator itr = a->Begin(); itr != a->End(); ++itr)
2285  if (itr->GetUint64() == h) {
2286  DuplicateItems(static_cast<SizeType>(itr - a->Begin()), a->Size());
2287  RAPIDJSON_INVALID_KEYWORD_RETURN(SchemaType::GetUniqueItemsString());
2288  }
2289  a->PushBack(h, GetStateAllocator());
2290  }
2291  }
2292 
2293  // Remove the last token of document pointer
2294  while (!documentStack_.Empty() && *documentStack_.template Pop<Ch>(1) != '/')
2295  ;
2296 
2297  return true;
2298  }
const Ch * GetString() const
Definition: stringbuffer.h:73
array
Definition: rapidjson.h:623
bool Empty() const
Definition: stack.h:176
const GenericValue * ConstValueIterator
Constant value iterator for iterating in array.
Definition: document.h:586
internal::Stack< StateAllocator > documentStack_
stack to store the current path of validating document (Ch)
Definition: schema.h:2403
RAPIDJSON_FORCEINLINE void PopSchema()
Definition: schema.h:2319
const SchemaDocumentType * schemaDocument_
Definition: schema.h:2398
internal::Hasher< EncodingType, StateAllocator > HasherType
Definition: schema.h:2192
Context & CurrentContext()
Definition: schema.h:2393
unsigned __int64 uint64_t
Definition: stdint.h:136
#define RAPIDJSON_INVALID_KEYWORD_RETURN(keyword)
Definition: schema.h:116
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
Represents an in-memory output stream.
Definition: fwd.h:59
GenericValue< UTF8<>, StateAllocator > HashCodeArray
Definition: schema.h:2191
SchemaType::Context Context
Definition: schema.h:2190
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
const SchemaType & CurrentSchema() const
Definition: schema.h:2392
virtual uint64_t GetHashCode(void *hasher)
Definition: schema.h:2171
void DuplicateItems(SizeType index1, SizeType index2)
Definition: schema.h:1942
h
training ###############################
Definition: train_cnn.py:186
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::FreeState ( void *  p)
inlinevirtual

Implements internal::ISchemaStateFactory< SchemaDocumentType::SchemaType >.

Definition at line 2185 of file schema.h.

2185  {
2186  StateAllocator::Free(p);
2187  }
p
Definition: test.py:223
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
ValueType& GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetError ( )
inline

Gets the error object.

Definition at line 1858 of file schema.h.

1858 { return error_; }
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
const ValueType& GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetError ( ) const
inline

Definition at line 1859 of file schema.h.

1859 { return error_; }
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual uint64_t GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetHashCode ( void *  hasher)
inlinevirtual

Implements internal::ISchemaStateFactory< SchemaDocumentType::SchemaType >.

Definition at line 2171 of file schema.h.

2171  {
2172  return static_cast<HasherType*>(hasher)->GetHashCode();
2173  }
internal::Hasher< EncodingType, StateAllocator > HasherType
Definition: schema.h:2192
virtual uint64_t GetHashCode(void *hasher)
Definition: schema.h:2171
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
PointerType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetInvalidDocumentPointer ( ) const
inline

Gets the JSON pointer pointed to the invalid value.

Definition at line 1872 of file schema.h.

1872  {
1873  if (documentStack_.Empty()) {
1874  return PointerType();
1875  }
1876  else {
1877  return PointerType(documentStack_.template Bottom<Ch>(), documentStack_.GetSize() / sizeof(Ch));
1878  }
1879  }
SchemaDocumentType::PointerType PointerType
Definition: schema.h:1768
bool Empty() const
Definition: stack.h:176
internal::Stack< StateAllocator > documentStack_
stack to store the current path of validating document (Ch)
Definition: schema.h:2403
size_t GetSize() const
Definition: stack.h:177
EncodingType::Ch Ch
Definition: schema.h:1771
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
const Ch* GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetInvalidSchemaKeyword ( ) const
inline

Gets the keyword of invalid schema.

Definition at line 1867 of file schema.h.

1867  {
1868  return schemaStack_.Empty() ? 0 : CurrentContext().invalidKeyword;
1869  }
bool Empty() const
Definition: stack.h:176
Context & CurrentContext()
Definition: schema.h:2393
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
PointerType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetInvalidSchemaPointer ( ) const
inline

Gets the JSON pointer pointed to the invalid schema.

Definition at line 1862 of file schema.h.

1862  {
1863  return schemaStack_.Empty() ? PointerType() : CurrentSchema().GetPointer();
1864  }
SchemaDocumentType::PointerType PointerType
Definition: schema.h:1768
bool Empty() const
Definition: stack.h:176
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
const SchemaType & CurrentSchema() const
Definition: schema.h:2392
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
StateAllocator& GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetStateAllocator ( )
inlineprivate

Definition at line 2224 of file schema.h.

2224  {
2225  if (!stateAllocator_)
2226  stateAllocator_ = ownStateAllocator_ = RAPIDJSON_NEW(StateAllocator)();
2227  return *stateAllocator_;
2228  }
StateAllocator * stateAllocator_
Definition: schema.h:2400
StateAllocator * ownStateAllocator_
Definition: schema.h:2401
#define RAPIDJSON_NEW(TypeName)
! customization point for global new
Definition: rapidjson.h:601
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Int ( int  i)
inline

Definition at line 2103 of file schema.h.

#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition: schema.h:2096
Context & CurrentContext()
Definition: schema.h:2393
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Int64 ( int64_t  i)
inline

Definition at line 2105 of file schema.h.

#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition: schema.h:2096
bool Int64(int64_t i)
Definition: schema.h:2105
Context & CurrentContext()
Definition: schema.h:2393
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::IsValid ( ) const
inlinevirtual

Checks whether the current state is valid.

Implements internal::ISchemaValidator.

Definition at line 1855 of file schema.h.

1855 { return valid_; }
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Key ( const Ch str,
SizeType  len,
bool  copy 
)
inline

Definition at line 2119 of file schema.h.

2119  {
2120  if (!valid_) return false;
2121  AppendToken(str, len);
2122  if (!CurrentSchema().Key(CurrentContext(), str, len, copy)) return valid_ = false;
2124  return valid_ = !outputHandler_ || outputHandler_->Key(str, len, copy);
2125  }
void AppendToken(const Ch *str, SizeType len)
Definition: schema.h:2300
OutputHandler * outputHandler_
Definition: schema.h:2404
bool Key(const Ch *str, SizeType len, bool copy)
Definition: schema.h:2119
Context & CurrentContext()
Definition: schema.h:2393
#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)
Definition: schema.h:2081
T copy(T const &v)
const SchemaType & CurrentSchema() const
Definition: schema.h:2392
static QCString str
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual void* GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::MallocState ( size_t  size)
inlinevirtual

Implements internal::ISchemaStateFactory< SchemaDocumentType::SchemaType >.

Definition at line 2181 of file schema.h.

2181  {
2182  return GetStateAllocator().Malloc(size);
2183  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::MergeError ( ValueType other)
inlineprivate

Definition at line 2366 of file schema.h.

2366  {
2367  for (typename ValueType::MemberIterator it = other.MemberBegin(), end = other.MemberEnd(); it != end; ++it) {
2368  AddError(it->name, it->value);
2369  }
2370  }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
void AddError(ValueType &keyword, ValueType &error)
Definition: schema.h:2347
GenericMemberIterator< false, EncodingType, StateAllocator >::Iterator MemberIterator
Member iterator for iterating in object.
Definition: document.h:583
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::NoneOf ( ISchemaValidator **  subvalidators,
SizeType  count 
)
inline

Definition at line 2034 of file schema.h.

2034  {
2035  AddErrorArray(SchemaType::GetAnyOfString(), subvalidators, count);
2036  }
void AddErrorArray(const typename SchemaType::ValueType &keyword, ISchemaValidator **subvalidators, SizeType count)
Definition: schema.h:2382
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::NotAllOf ( ISchemaValidator **  subvalidators,
SizeType  count 
)
inline

Definition at line 2029 of file schema.h.

2029  {
2030  for (SizeType i = 0; i < count; ++i) {
2031  MergeError(static_cast<GenericSchemaValidator*>(subvalidators[i])->GetError());
2032  }
2033  }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:384
void MergeError(ValueType &other)
Definition: schema.h:2366
ValueType & GetError()
Gets the error object.
Definition: schema.h:1858
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::NotMultipleOf ( int64_t  actual,
const SValue expected 
)
inline

Definition at line 1881 of file schema.h.

1881  {
1882  AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected);
1883  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::NotMultipleOf ( uint64_t  actual,
const SValue expected 
)
inline

Definition at line 1884 of file schema.h.

1884  {
1885  AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected);
1886  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::NotMultipleOf ( double  actual,
const SValue expected 
)
inline

Definition at line 1887 of file schema.h.

1887  {
1888  AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected);
1889  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::NotOneOf ( ISchemaValidator **  subvalidators,
SizeType  count 
)
inline

Definition at line 2037 of file schema.h.

2037  {
2038  AddErrorArray(SchemaType::GetOneOfString(), subvalidators, count);
2039  }
void AddErrorArray(const typename SchemaType::ValueType &keyword, ISchemaValidator **subvalidators, SizeType count)
Definition: schema.h:2382
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Null ( )
inline

Definition at line 2101 of file schema.h.

#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition: schema.h:2096
Context & CurrentContext()
Definition: schema.h:2393
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
RAPIDJSON_FORCEINLINE void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::PopSchema ( )
inlineprivate

Definition at line 2319 of file schema.h.

2319  {
2320  Context* c = schemaStack_.template Pop<Context>(1);
2321  if (HashCodeArray* a = static_cast<HashCodeArray*>(c->arrayElementHashCodes)) {
2322  a->~HashCodeArray();
2323  StateAllocator::Free(a);
2324  }
2325  c->~Context();
2326  }
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
GenericValue< UTF8<>, StateAllocator > HashCodeArray
Definition: schema.h:2191
SchemaType::Context Context
Definition: schema.h:2190
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::PropertyViolations ( ISchemaValidator **  subvalidators,
SizeType  count 
)
inline

Definition at line 1974 of file schema.h.

1974  {
1975  for (SizeType i = 0; i < count; ++i)
1976  MergeError(static_cast<GenericSchemaValidator*>(subvalidators[i])->GetError());
1977  }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:384
void MergeError(ValueType &other)
Definition: schema.h:2366
ValueType & GetError()
Gets the error object.
Definition: schema.h:1858
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
RAPIDJSON_FORCEINLINE void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::PushSchema ( const SchemaType schema)
inlineprivate

Definition at line 2317 of file schema.h.

2317 { new (schemaStack_.template Push<Context>()) Context(*this, *this, &schema); }
SchemaType::Context Context
Definition: schema.h:2190
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::RawNumber ( const Ch str,
SizeType  length,
bool  copy 
)
inline

Definition at line 2108 of file schema.h.

2109  { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); }
#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition: schema.h:2096
Context & CurrentContext()
Definition: schema.h:2393
T copy(T const &v)
static QCString str
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Reset ( )
inline

Reset the internal states.

Definition at line 1843 of file schema.h.

1843  {
1844  while (!schemaStack_.Empty())
1845  PopSchema();
1847  error_.SetObject();
1848  currentError_.SetNull();
1849  missingDependents_.SetNull();
1850  valid_ = true;
1851  }
bool Empty() const
Definition: stack.h:176
internal::Stack< StateAllocator > documentStack_
stack to store the current path of validating document (Ch)
Definition: schema.h:2403
void Clear()
Definition: stack.h:98
RAPIDJSON_FORCEINLINE void PopSchema()
Definition: schema.h:2319
ValueType missingDependents_
Definition: schema.h:2407
ValueType currentError_
Definition: schema.h:2406
internal::Stack< StateAllocator > schemaStack_
stack to store the current path of schema (BaseSchemaType *)
Definition: schema.h:2402
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StartArray ( )
inline

Definition at line 2134 of file schema.h.

2134  {
2137  return valid_ = !outputHandler_ || outputHandler_->StartArray();
2138  }
OutputHandler * outputHandler_
Definition: schema.h:2404
Context & CurrentContext()
Definition: schema.h:2393
#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)
Definition: schema.h:2074
#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)
Definition: schema.h:2081
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StartDependencyErrors ( )
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1984 of file schema.h.

1984  {
1985  currentError_.SetObject();
1986  }
ValueType currentError_
Definition: schema.h:2406
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StartDisallowedType ( )
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 2016 of file schema.h.

2016  {
2017  currentError_.SetArray();
2018  }
ValueType currentError_
Definition: schema.h:2406
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StartMissingDependentProperties ( )
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1987 of file schema.h.

1987  {
1988  missingDependents_.SetArray();
1989  }
ValueType missingDependents_
Definition: schema.h:2407
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StartMissingProperties ( )
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1959 of file schema.h.

1959  {
1960  currentError_.SetArray();
1961  }
ValueType currentError_
Definition: schema.h:2406
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StartObject ( )
inline

Definition at line 2113 of file schema.h.

2113  {
2116  return valid_ = !outputHandler_ || outputHandler_->StartObject();
2117  }
OutputHandler * outputHandler_
Definition: schema.h:2404
Context & CurrentContext()
Definition: schema.h:2393
#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)
Definition: schema.h:2074
#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)
Definition: schema.h:2081
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::String ( const Ch str,
SizeType  length,
bool  copy 
)
inline

Definition at line 2110 of file schema.h.

2111  { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); }
#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition: schema.h:2096
Context & CurrentContext()
Definition: schema.h:2393
T copy(T const &v)
static QCString str
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::TooFewItems ( SizeType  actualCount,
SizeType  expectedCount 
)
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1934 of file schema.h.

1934  {
1935  AddNumberError(SchemaType::GetMinItemsString(),
1936  ValueType(actualCount).Move(), SValue(expectedCount).Move());
1937  }
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
SchemaType::SValue SValue
Definition: schema.h:1770
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::TooFewProperties ( SizeType  actualCount,
SizeType  expectedCount 
)
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1955 of file schema.h.

1955  {
1956  AddNumberError(SchemaType::GetMinPropertiesString(),
1957  ValueType(actualCount).Move(), SValue(expectedCount).Move());
1958  }
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
SchemaType::SValue SValue
Definition: schema.h:1770
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::TooLong ( const Ch str,
SizeType  length,
SizeType  expected 
)
inline

Definition at line 1915 of file schema.h.

1915  {
1916  AddNumberError(SchemaType::GetMaxLengthString(),
1917  ValueType(str, length, GetStateAllocator()).Move(), SValue(expected).Move());
1918  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
SchemaType::SValue SValue
Definition: schema.h:1770
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
static QCString str
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::TooManyItems ( SizeType  actualCount,
SizeType  expectedCount 
)
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1938 of file schema.h.

1938  {
1939  AddNumberError(SchemaType::GetMaxItemsString(),
1940  ValueType(actualCount).Move(), SValue(expectedCount).Move());
1941  }
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
SchemaType::SValue SValue
Definition: schema.h:1770
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::TooManyProperties ( SizeType  actualCount,
SizeType  expectedCount 
)
inlinevirtual

Implements internal::IValidationErrorHandler< SchemaDocumentType::SchemaType >.

Definition at line 1951 of file schema.h.

1951  {
1952  AddNumberError(SchemaType::GetMaxPropertiesString(),
1953  ValueType(actualCount).Move(), SValue(expectedCount).Move());
1954  }
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
SchemaType::SValue SValue
Definition: schema.h:1770
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::TooShort ( const Ch str,
SizeType  length,
SizeType  expected 
)
inline

Definition at line 1919 of file schema.h.

1919  {
1920  AddNumberError(SchemaType::GetMinLengthString(),
1921  ValueType(str, length, GetStateAllocator()).Move(), SValue(expected).Move());
1922  }
const char expected[]
Definition: Exception_t.cc:22
void AddNumberError(const typename SchemaType::ValueType &keyword, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0)
Definition: schema.h:2372
GenericValue< EncodingType, StateAllocator > ValueType
Definition: schema.h:1773
SchemaType::SValue SValue
Definition: schema.h:1770
StateAllocator & GetStateAllocator()
Definition: schema.h:2224
static QCString str
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Uint ( unsigned  u)
inline

Definition at line 2104 of file schema.h.

#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition: schema.h:2096
Context & CurrentContext()
Definition: schema.h:2393
bool Uint(unsigned u)
Definition: schema.h:2104
template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Uint64 ( uint64_t  u)
inline

Definition at line 2106 of file schema.h.

#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition: schema.h:2096
Context & CurrentContext()
Definition: schema.h:2393
bool Uint64(uint64_t u)
Definition: schema.h:2106

Member Data Documentation

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
ValueType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::currentError_
private

Definition at line 2406 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
internal::Stack<StateAllocator> GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::documentStack_
private

stack to store the current path of validating document (Ch)

Definition at line 2403 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
ValueType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::error_
private

Definition at line 2405 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
const size_t GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::kDefaultDocumentStackCapacity = 256
staticprivate

Definition at line 2397 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
const size_t GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::kDefaultSchemaStackCapacity = 1024
staticprivate

Definition at line 2396 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
ValueType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::missingDependents_
private

Definition at line 2407 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
OutputHandler* GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::outputHandler_
private

Definition at line 2404 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
StateAllocator* GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::ownStateAllocator_
private

Definition at line 2401 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
const SchemaType& GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::root_
private

Definition at line 2399 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
const SchemaDocumentType* GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::schemaDocument_
private

Definition at line 2398 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
internal::Stack<StateAllocator> GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::schemaStack_
private

stack to store the current path of schema (BaseSchemaType *)

Definition at line 2402 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
StateAllocator* GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::stateAllocator_
private

Definition at line 2400 of file schema.h.

template<typename SchemaDocumentType, typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::valid_
private

Definition at line 2408 of file schema.h.


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