JSON Schema Validator. Plus de détails...
#include <arcane/utils/internal/json/rapidjson/schema.h>
Graphe d'héritage de GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >:
Graphe de collaboration de GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >:Types publics | |
| typedef SchemaDocumentType::SchemaType | SchemaType |
| typedef SchemaDocumentType::PointerType | PointerType |
| typedef SchemaType::EncodingType | EncodingType |
| typedef SchemaType::SValue | SValue |
| typedef EncodingType::Ch | Ch |
| typedef GenericStringRef< Ch > | StringRefType |
| typedef GenericValue< EncodingType, StateAllocator > | ValueType |
Types publics hérités de internal::IValidationErrorHandler< SchemaDocumentType::SchemaType > | |
| typedef SchemaType::Ch | Ch |
| typedef SchemaType::SValue | SValue |
Fonctions membres publiques | |
| GenericSchemaValidator (const SchemaDocumentType &schemaDocument, StateAllocator *allocator=0, size_t schemaStackCapacity=kDefaultSchemaStackCapacity, size_t documentStackCapacity=kDefaultDocumentStackCapacity) | |
| Constructor without output handler. | |
| GenericSchemaValidator (const SchemaDocumentType &schemaDocument, OutputHandler &outputHandler, StateAllocator *allocator=0, size_t schemaStackCapacity=kDefaultSchemaStackCapacity, size_t documentStackCapacity=kDefaultDocumentStackCapacity) | |
| Constructor with output handler. | |
| ~GenericSchemaValidator () | |
| Destructor. | |
| void | Reset () |
| Reset the internal states. | |
| void | ResetError () |
| Reset the error state. | |
| void | SetValidateFlags (unsigned flags) |
| Implementation of ISchemaValidator. | |
| virtual unsigned | GetValidateFlags () const |
| virtual bool | IsValid () const |
| ValueType & | GetError () |
| End of Implementation of ISchemaValidator. | |
| const ValueType & | GetError () const |
| PointerType | GetInvalidSchemaPointer () const |
| Gets the JSON pointer pointed to the invalid schema. | |
| const Ch * | GetInvalidSchemaKeyword () const |
| Gets the keyword of invalid schema. | |
| ValidateErrorCode | GetInvalidSchemaCode () const |
| Gets the error code of invalid schema. | |
| PointerType | GetInvalidDocumentPointer () const |
| Gets the JSON pointer pointed to the invalid value. | |
| 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 (const ValidateErrorCode code=kValidateErrorEnum) |
| 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 | MultipleOneOf (SizeType index1, SizeType index2) |
| void | Disallowed () |
| void | DisallowedWhenWriting () |
| void | DisallowedWhenReading () |
| RAPIDJSON_STRING_ (InstanceRef, 'i', 'n', 's', 't', 'a', 'n', 'c', 'e', 'R', 'e', 'f') RAPIDJSON_STRING_(SchemaRef | |
| f | RAPIDJSON_STRING_ (Expected, 'e', 'x', 'p', 'e', 'c', 't', 'e', 'd') RAPIDJSON_STRING_(Actual |
| f l | RAPIDJSON_STRING_ (Disallowed, 'd', 'i', 's', 'a', 'l', 'l', 'o', 'w', 'e', 'd') RAPIDJSON_STRING_(Missing |
| f l g | RAPIDJSON_STRING_ (Errors, 'e', 'r', 'r', 'o', 'r', 's') RAPIDJSON_STRING_(ErrorCode |
| f l g e | RAPIDJSON_STRING_ (ErrorMessage, 'e', 'r', 'r', 'o', 'r', 'M', 'e', 's', 's', 'a', 'g', 'e') RAPIDJSON_STRING_(Duplicates |
| f l g e s | RAPIDJSON_STRING_ (Matches, 'm', 'a', 't', 'c', 'h', 'e', 's') 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, const bool inheritContinueOnErrors) |
| 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) |
Fonctions membres publiques hérités de internal::ISchemaStateFactory< SchemaDocumentType::SchemaType > | |
| virtual ISchemaValidator * | CreateSchemaValidator (const SchemaType &, const bool inheritContinueOnErrors)=0 |
| virtual void | DestroySchemaValidator (ISchemaValidator *validator)=0 |
Fonctions membres publiques hérités de internal::IValidationErrorHandler< SchemaDocumentType::SchemaType > | |
| 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 | PropertyViolations (ISchemaValidator **subvalidators, SizeType count)=0 |
| virtual void | DisallowedProperty (const Ch *name, SizeType length)=0 |
| virtual void | AddDependencySchemaError (const SValue &souceName, ISchemaValidator *subvalidator)=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 |
Attributs publics | |
| s | |
| c | |
| h | |
| e | |
| m | |
| a | |
| R | |
| f | a |
| f | c |
| f | t |
| f | u |
| f l | m |
| f l | i |
| f l | s |
| f l | n |
| f l g | e |
| f l g | r |
| f l g | o |
| f l g | C |
| f l g | d |
| f l g e | d |
| f l g e | u |
| f l g e | p |
| f l g e | l |
| f l g e | i |
| f l g e | c |
| f l g e | a |
| f l g e | t |
| f l g e | e |
Types privés | |
| typedef SchemaType::Context | Context |
| typedef GenericValue< UTF8<>, StateAllocator > | HashCodeArray |
| typedef internal::Hasher< EncodingType, StateAllocator > | HasherType |
Fonctions membres privées | |
| GenericSchemaValidator (const SchemaDocumentType &schemaDocument, const SchemaType &root, const char *basePath, size_t basePathSize, unsigned depth, StateAllocator *allocator=0, size_t schemaStackCapacity=kDefaultSchemaStackCapacity, size_t documentStackCapacity=kDefaultDocumentStackCapacity) | |
| StateAllocator & | GetStateAllocator () |
| bool | GetContinueOnErrors () const |
| bool | BeginValue () |
| bool | EndValue () |
| void | AppendToken (const Ch *str, SizeType len) |
| RAPIDJSON_FORCEINLINE void | PushSchema (const SchemaType &schema) |
| RAPIDJSON_FORCEINLINE void | PopSchema () |
| void | AddErrorInstanceLocation (ValueType &result, bool parent) |
| void | AddErrorSchemaLocation (ValueType &result, PointerType schema=PointerType()) |
| void | AddErrorCode (ValueType &result, const ValidateErrorCode code) |
| void | AddError (ValueType &keyword, ValueType &error) |
| void | AddCurrentError (const ValidateErrorCode code, bool parent=false) |
| void | MergeError (ValueType &other) |
| void | AddNumberError (const ValidateErrorCode code, ValueType &actual, const SValue &expected, const typename SchemaType::ValueType &(*exclusive)()=0) |
| void | AddErrorArray (const ValidateErrorCode code, ISchemaValidator **subvalidators, SizeType count) |
| const SchemaType & | CurrentSchema () const |
| Context & | CurrentContext () |
| const Context & | CurrentContext () const |
Attributs privés | |
| const SchemaDocumentType * | schemaDocument_ |
| const SchemaType & | root_ |
| StateAllocator * | stateAllocator_ |
| StateAllocator * | ownStateAllocator_ |
| internal::Stack< StateAllocator > | schemaStack_ |
| stack to store the current path of schema (BaseSchemaType *) | |
| internal::Stack< StateAllocator > | documentStack_ |
| stack to store the current path of validating document (Ch) | |
| OutputHandler * | outputHandler_ |
| ValueType | error_ |
| ValueType | currentError_ |
| ValueType | missingDependents_ |
| bool | valid_ |
| unsigned | flags_ |
| unsigned | depth_ |
Attributs privés statiques | |
| static const size_t | kDefaultSchemaStackCapacity = 1024 |
| static const size_t | kDefaultDocumentStackCapacity = 256 |
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().
| typedef EncodingType::Ch GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Ch |
|
private |
| typedef SchemaType::EncodingType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EncodingType |
|
private |
|
private |
| typedef SchemaDocumentType::PointerType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::PointerType |
| typedef SchemaDocumentType::SchemaType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::SchemaType |
| typedef GenericStringRef<Ch> GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StringRefType |
| typedef SchemaType::SValue GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::SValue |
| typedef GenericValue<EncodingType, StateAllocator> GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::ValueType |
|
inline |
Constructor without output handler.
| schemaDocument | The schema document to conform to. |
| allocator | Optional allocator for storing internal validation states. |
| schemaStackCapacity | Optional initial capacity of schema path stack. |
| documentStackCapacity | Optional initial capacity of document path stack. |
|
inline |
Constructor with output handler.
| schemaDocument | The schema document to conform to. |
| allocator | Optional allocator for storing internal validation states. |
| schemaStackCapacity | Optional initial capacity of schema path stack. |
| documentStackCapacity | Optional initial capacity of document path stack. |
|
inline |
|
inlineprivate |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inlineprivate |
|
inlinevirtual |
|
inlineprivate |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlinevirtual |
Implémente internal::ISchemaValidator.
|
inline |
|
inline |
|
inlinevirtual |
Implémente internal::ISchemaValidator.
|
inline |
|
inlinevirtual |
|
inlineprivate |
|
inlinevirtual |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
Reset the internal states.
Définition à la ligne 2519 du fichier schema.h.
Référencé par GenericSchemaValidator< SchemaDocument, BaseReaderHandler< UTF8< char >, void >, CrtAllocator >::~GenericSchemaValidator().
Voici le graphe des appelants de cette fonction :
|
inline |
Reset the error state.
Définition à la ligne 2527 du fichier schema.h.
Référencé par GenericSchemaValidator< SchemaDocument, BaseReaderHandler< UTF8< char >, void >, CrtAllocator >::Reset().
Voici le graphe des appelants de cette fonction :
|
inlinevirtual |
Implementation of ISchemaValidator.
Implémente internal::ISchemaValidator.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
| f GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::a |
| f GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::a |
| f l g e GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::a |
| f l g GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::C |
| GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::c |
| f GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::c |
| f l g e GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::c |
|
private |
| f l g GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::d |
| f l g e GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::d |
|
private |
|
private |
| GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::e |
| f l g GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::e |
| f l g e GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::e |
|
private |
|
private |
| GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::h |
| f l GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::i |
| f l g e GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::i |
|
staticprivate |
|
staticprivate |
| f l g e GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::l |
| GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::m |
| f l GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::m |
|
private |
| f l GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::n |
| f l g GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::o |
|
private |
|
private |
| f l g e GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::p |
| GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::R |
| f l g GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::r |
|
private |
| f l GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::s |
| f l GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::s |
|
private |
|
private |
|
private |
| f GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::t |
| f l g e GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::t |
| f GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::u |
| f l g e GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::u |
|
private |