Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator > Class Template Reference

JSON Schema Validator. More...

#include <schema.h>

Inheritance diagram for GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >:
Collaboration diagram for GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >:

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 SchemaType::Ch Ch
 
typedef 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.
 
 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.
 
virtual bool IsValid () const
 Checks whether the current state is valid.
 
ValueTypeGetError ()
 Gets the error object.
 
const ValueTypeGetError () const
 
PointerType GetInvalidSchemaPointer () const
 Gets the JSON pointer pointed to the invalid schema.
 
const ChGetInvalidSchemaKeyword () const
 Gets the keyword 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 ()
 
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 ISchemaValidatorCreateSchemaValidator (const SchemaType &)=0
 
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 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
 

Detailed Description

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

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 1763 of file schema.h.

Member Typedef Documentation

◆ Ch

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

Definition at line 1773 of file schema.h.

◆ EncodingType

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

Definition at line 1771 of file schema.h.

◆ PointerType

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

Definition at line 1770 of file schema.h.

◆ SchemaType

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

Definition at line 1769 of file schema.h.

◆ StringRefType

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

Definition at line 1774 of file schema.h.

◆ SValue

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

Definition at line 1772 of file schema.h.

◆ ValueType

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

Definition at line 1775 of file schema.h.

Constructor & Destructor Documentation

◆ GenericSchemaValidator() [1/2]

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
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 1784 of file schema.h.

1789 :
1790 schemaDocument_(&schemaDocument),
1791 root_(schemaDocument.GetRoot()),
1792 stateAllocator_(allocator),
1793 ownStateAllocator_(0),
1794 schemaStack_(allocator, schemaStackCapacity),
1795 documentStack_(allocator, documentStackCapacity),
1796 outputHandler_(0),
1797 error_(kObjectType),
1798 currentError_(),
1799 missingDependents_(),
1800 valid_(true)
1801#if RAPIDJSON_SCHEMA_VERBOSE
1802 , depth_(0)
1803#endif
1804 {
1805 }
@ kObjectType
object
Definition rapidjson.h:648
Here is the caller graph for this function:

◆ GenericSchemaValidator() [2/2]

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
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 1814 of file schema.h.

1820 :
1821 schemaDocument_(&schemaDocument),
1822 root_(schemaDocument.GetRoot()),
1823 stateAllocator_(allocator),
1824 ownStateAllocator_(0),
1825 schemaStack_(allocator, schemaStackCapacity),
1826 documentStack_(allocator, documentStackCapacity),
1827 outputHandler_(&outputHandler),
1828 error_(kObjectType),
1829 currentError_(),
1830 missingDependents_(),
1831 valid_(true)
1832#if RAPIDJSON_SCHEMA_VERBOSE
1833 , depth_(0)
1834#endif
1835 {
1836 }

◆ ~GenericSchemaValidator()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::~GenericSchemaValidator ( )
inline

Definition at line 1839 of file schema.h.

1839 {
1840 Reset();
1841 RAPIDJSON_DELETE(ownStateAllocator_);
1842 }
void Reset()
Reset the internal states.
Definition schema.h:1845
#define RAPIDJSON_DELETE(x)
! customization point for global delete
Definition rapidjson.h:631
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ AboveMaximum() [1/3]

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 )
inlinevirtual

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

Definition at line 1900 of file schema.h.

1900 {
1901 AddNumberError(SchemaType::GetMaximumString(), ValueType(actual).Move(), expected,
1902 exclusive ? &SchemaType::GetExclusiveMaximumString : 0);
1903 }
GenericValue< EncodingType, StateAllocator > ValueType
Definition schema.h:1775

◆ AboveMaximum() [2/3]

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 )
inlinevirtual

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

Definition at line 1892 of file schema.h.

1892 {
1893 AddNumberError(SchemaType::GetMaximumString(), ValueType(actual).Move(), expected,
1894 exclusive ? &SchemaType::GetExclusiveMaximumString : 0);
1895 }

◆ AboveMaximum() [3/3]

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 )
inlinevirtual

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

Definition at line 1896 of file schema.h.

1896 {
1897 AddNumberError(SchemaType::GetMaximumString(), ValueType(actual).Move(), expected,
1898 exclusive ? &SchemaType::GetExclusiveMaximumString : 0);
1899 }

◆ AddDependencySchemaError()

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 2000 of file schema.h.

2000 {
2001 currentError_.AddMember(ValueType(sourceName, GetStateAllocator()).Move(),
2002 static_cast<GenericSchemaValidator*>(subvalidator)->GetError(), GetStateAllocator());
2003 }
JSON Schema Validator.
Definition schema.h:1767
ValueType & GetError()
Gets the error object.
Definition schema.h:1860
Here is the call graph for this function:

◆ AddExpectedType()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddExpectedType ( const typename SchemaType::ValueType & expectedType)
inlinevirtual

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

Definition at line 2021 of file schema.h.

2021 {
2022 currentError_.PushBack(ValueType(expectedType, GetStateAllocator()).Move(), GetStateAllocator());
2023 }

◆ AddMissingDependentProperty()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddMissingDependentProperty ( const SValue & targetName)
inlinevirtual

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

Definition at line 1992 of file schema.h.

1992 {
1993 missingDependents_.PushBack(ValueType(targetName, GetStateAllocator()).Move(), GetStateAllocator());
1994 }

◆ AddMissingProperty()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::AddMissingProperty ( const SValue & name)
inlinevirtual

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

Definition at line 1964 of file schema.h.

1964 {
1965 currentError_.PushBack(ValueType(name, GetStateAllocator()).Move(), GetStateAllocator());
1966 }
std::string name

◆ BelowMinimum() [1/3]

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 )
inlinevirtual

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

Definition at line 1912 of file schema.h.

1912 {
1913 AddNumberError(SchemaType::GetMinimumString(), ValueType(actual).Move(), expected,
1914 exclusive ? &SchemaType::GetExclusiveMinimumString : 0);
1915 }

◆ BelowMinimum() [2/3]

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 )
inlinevirtual

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

Definition at line 1904 of file schema.h.

1904 {
1905 AddNumberError(SchemaType::GetMinimumString(), ValueType(actual).Move(), expected,
1906 exclusive ? &SchemaType::GetExclusiveMinimumString : 0);
1907 }

◆ BelowMinimum() [3/3]

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 )
inlinevirtual

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

Definition at line 1908 of file schema.h.

1908 {
1909 AddNumberError(SchemaType::GetMinimumString(), ValueType(actual).Move(), expected,
1910 exclusive ? &SchemaType::GetExclusiveMinimumString : 0);
1911 }

◆ Bool()

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 2104 of file schema.h.

2104{ RAPIDJSON_SCHEMA_HANDLE_VALUE_(Bool, (CurrentContext(), b), (b)); }
#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
Definition schema.h:2098

◆ CreateHasher()

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 2169 of file schema.h.

2169 {
2170 return new (GetStateAllocator().Malloc(sizeof(HasherType))) HasherType(&GetStateAllocator());
2171 }

◆ CreateSchemaValidator()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual ISchemaValidator * GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::CreateSchemaValidator ( const SchemaType & root)
inlinevirtual

Definition at line 2155 of file schema.h.

2155 {
2156 return new (GetStateAllocator().Malloc(sizeof(GenericSchemaValidator))) GenericSchemaValidator(*schemaDocument_, root, documentStack_.template Bottom<char>(), documentStack_.GetSize(),
2158 depth_ + 1,
2159#endif
2160 &GetStateAllocator());
2161 }
GenericSchemaValidator(const SchemaDocumentType &schemaDocument, StateAllocator *allocator=0, size_t schemaStackCapacity=kDefaultSchemaStackCapacity, size_t documentStackCapacity=kDefaultDocumentStackCapacity)
Constructor without output handler.
Definition schema.h:1784
#define RAPIDJSON_SCHEMA_VERBOSE
Definition schema.h:48
Here is the call graph for this function:

◆ DestroryHasher()

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 2177 of file schema.h.

2177 {
2178 HasherType* h = static_cast<HasherType*>(hasher);
2179 h->~HasherType();
2180 StateAllocator::Free(h);
2181 }

◆ DestroySchemaValidator()

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 2163 of file schema.h.

2163 {
2164 GenericSchemaValidator* v = static_cast<GenericSchemaValidator*>(validator);
2166 StateAllocator::Free(v);
2167 }
~GenericSchemaValidator()
Destructor.
Definition schema.h:1839
Here is the call graph for this function:

◆ Disallowed()

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 2042 of file schema.h.

2042 {
2043 currentError_.SetObject();
2044 AddCurrentError(SchemaType::GetNotString());
2045 }

◆ DisallowedItem()

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 1931 of file schema.h.

1931 {
1932 currentError_.SetObject();
1933 currentError_.AddMember(GetDisallowedString(), ValueType(index).Move(), GetStateAllocator());
1934 AddCurrentError(SchemaType::GetAdditionalItemsString(), true);
1935 }

◆ DisallowedProperty()

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 1980 of file schema.h.

1980 {
1981 currentError_.SetObject();
1982 currentError_.AddMember(GetDisallowedString(), ValueType(name, length, GetStateAllocator()).Move(), GetStateAllocator());
1983 AddCurrentError(SchemaType::GetAdditionalPropertiesString(), true);
1984 }

◆ DisallowedValue()

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 2014 of file schema.h.

2014 {
2015 currentError_.SetObject();
2016 AddCurrentError(SchemaType::GetEnumString());
2017 }

◆ DoesNotMatch()

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 1925 of file schema.h.

1925 {
1926 currentError_.SetObject();
1927 currentError_.AddMember(GetActualString(), ValueType(str, length, GetStateAllocator()).Move(), GetStateAllocator());
1928 AddCurrentError(SchemaType::GetPatternString());
1929 }

◆ Double()

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 2109 of file schema.h.

2109{ RAPIDJSON_SCHEMA_HANDLE_VALUE_(Double, (CurrentContext(), d), (d)); }
bool Double(double d)
Definition schema.h:2109
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DuplicateItems()

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 1944 of file schema.h.

1944 {
1945 ValueType duplicates(kArrayType);
1946 duplicates.PushBack(index1, GetStateAllocator());
1947 duplicates.PushBack(index2, GetStateAllocator());
1948 currentError_.SetObject();
1949 currentError_.AddMember(GetDuplicatesString(), duplicates, GetStateAllocator());
1950 AddCurrentError(SchemaType::GetUniqueItemsString(), true);
1951 }
@ kArrayType
array
Definition rapidjson.h:649

◆ EndArray()

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 2142 of file schema.h.

2142 {
2143 if (!valid_) return false;
2145 if (!CurrentSchema().EndArray(CurrentContext(), elementCount)) return valid_ = false;
2146 RAPIDJSON_SCHEMA_HANDLE_END_(EndArray, (elementCount));
2147 }
bool EndArray(SizeType elementCount)
Definition schema.h:2142
#define RAPIDJSON_SCHEMA_HANDLE_END_(method, arg2)
Definition schema.h:2095
#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)
Definition schema.h:2083
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EndDependencyErrors()

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 2004 of file schema.h.

2004 {
2005 if (currentError_.ObjectEmpty())
2006 return false;
2007 ValueType error(kObjectType);
2008 error.AddMember(GetErrorsString(), currentError_, GetStateAllocator());
2009 currentError_ = error;
2010 AddCurrentError(SchemaType::GetDependenciesString());
2011 return true;
2012 }

◆ EndDisallowedType()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EndDisallowedType ( const typename SchemaType::ValueType & actualType)
inlinevirtual

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

Definition at line 2024 of file schema.h.

2024 {
2025 ValueType error(kObjectType);
2026 error.AddMember(GetExpectedString(), currentError_, GetStateAllocator());
2027 error.AddMember(GetActualString(), ValueType(actualType, GetStateAllocator()).Move(), GetStateAllocator());
2028 currentError_ = error;
2029 AddCurrentError(SchemaType::GetTypeString());
2030 }

◆ EndMissingDependentProperties()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::EndMissingDependentProperties ( const SValue & sourceName)
inlinevirtual

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

Definition at line 1995 of file schema.h.

1995 {
1996 if (!missingDependents_.Empty())
1997 currentError_.AddMember(ValueType(sourceName, GetStateAllocator()).Move(),
1998 missingDependents_, GetStateAllocator());
1999 }

◆ EndMissingProperties()

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 1967 of file schema.h.

1967 {
1968 if (currentError_.Empty())
1969 return false;
1970 ValueType error(kObjectType);
1971 error.AddMember(GetMissingString(), currentError_, GetStateAllocator());
1972 currentError_ = error;
1973 AddCurrentError(SchemaType::GetRequiredString());
1974 return true;
1975 }

◆ EndObject()

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 2129 of file schema.h.

2129 {
2130 if (!valid_) return false;
2132 if (!CurrentSchema().EndObject(CurrentContext(), memberCount)) return valid_ = false;
2134 }
bool EndObject(SizeType memberCount)
Definition schema.h:2129
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FreeState()

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 2187 of file schema.h.

2187 {
2188 StateAllocator::Free(p);
2189 }
const mie::Vuint & p
Definition bn.cpp:27

◆ GetError() [1/2]

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
ValueType & GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetError ( )
inline

Definition at line 1860 of file schema.h.

1860{ return error_; }
Here is the caller graph for this function:

◆ GetError() [2/2]

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 1861 of file schema.h.

1861{ return error_; }

◆ GetHashCode()

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 2173 of file schema.h.

2173 {
2174 return static_cast<HasherType*>(hasher)->GetHashCode();
2175 }
virtual uint64_t GetHashCode(void *hasher)
Definition schema.h:2173
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInvalidDocumentPointer()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
PointerType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetInvalidDocumentPointer ( ) const
inline

Definition at line 1874 of file schema.h.

1874 {
1875 if (documentStack_.Empty()) {
1876 return PointerType();
1877 }
1878 else {
1879 return PointerType(documentStack_.template Bottom<Ch>(), documentStack_.GetSize() / sizeof(Ch));
1880 }
1881 }
EncodingType::Ch Ch
Definition schema.h:1773
SchemaDocumentType::PointerType PointerType
Definition schema.h:1770
Here is the caller graph for this function:

◆ GetInvalidSchemaKeyword()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
const Ch * GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetInvalidSchemaKeyword ( ) const
inline

Definition at line 1869 of file schema.h.

1869 {
1870 return schemaStack_.Empty() ? 0 : CurrentContext().invalidKeyword;
1871 }
Here is the caller graph for this function:

◆ GetInvalidSchemaPointer()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
PointerType GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::GetInvalidSchemaPointer ( ) const
inline

Definition at line 1864 of file schema.h.

1864 {
1865 return schemaStack_.Empty() ? PointerType() : CurrentSchema().GetPointer();
1866 }
Here is the caller graph for this function:

◆ Int()

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 2105 of file schema.h.

2105{ RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int, (CurrentContext(), i), (i)); }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Int64()

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 2107 of file schema.h.

2107{ RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int64, (CurrentContext(), i), (i)); }
bool Int64(int64_t i)
Definition schema.h:2107
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsValid()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
virtual bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::IsValid ( ) const
inlinevirtual

Implements internal::ISchemaValidator.

Definition at line 1857 of file schema.h.

1857{ return valid_; }
Here is the caller graph for this function:

◆ Key()

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 2121 of file schema.h.

2121 {
2122 if (!valid_) return false;
2123 AppendToken(str, len);
2124 if (!CurrentSchema().Key(CurrentContext(), str, len, copy)) return valid_ = false;
2125 RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(Key, (str, len, copy));
2126 return valid_ = !outputHandler_ || outputHandler_->Key(str, len, copy);
2127 }
bool Key(const Ch *str, SizeType len, bool copy)
Definition schema.h:2121
size_t len
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MallocState()

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 2183 of file schema.h.

2183 {
2184 return GetStateAllocator().Malloc(size);
2185 }

◆ NoneOf()

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 2036 of file schema.h.

2036 {
2037 AddErrorArray(SchemaType::GetAnyOfString(), subvalidators, count);
2038 }
int * count

◆ NotAllOf()

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 2031 of file schema.h.

2031 {
2032 for (SizeType i = 0; i < count; ++i) {
2033 MergeError(static_cast<GenericSchemaValidator*>(subvalidators[i])->GetError());
2034 }
2035 }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition rapidjson.h:384
Here is the call graph for this function:

◆ NotMultipleOf() [1/3]

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::NotMultipleOf ( double actual,
const SValue & expected )
inlinevirtual

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

Definition at line 1889 of file schema.h.

1889 {
1890 AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected);
1891 }

◆ NotMultipleOf() [2/3]

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 )
inlinevirtual

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

Definition at line 1883 of file schema.h.

1883 {
1884 AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected);
1885 }

◆ NotMultipleOf() [3/3]

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 )
inlinevirtual

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

Definition at line 1886 of file schema.h.

1886 {
1887 AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected);
1888 }

◆ NotOneOf()

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 2039 of file schema.h.

2039 {
2040 AddErrorArray(SchemaType::GetOneOfString(), subvalidators, count);
2041 }

◆ Null()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Null ( )
inline

Definition at line 2103 of file schema.h.

2103{ RAPIDJSON_SCHEMA_HANDLE_VALUE_(Null, (CurrentContext()), ( )); }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PropertyViolations()

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 1976 of file schema.h.

1976 {
1977 for (SizeType i = 0; i < count; ++i)
1978 MergeError(static_cast<GenericSchemaValidator*>(subvalidators[i])->GetError());
1979 }
Here is the call graph for this function:

◆ RawNumber()

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 2110 of file schema.h.

2111 { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); }
bool String(const Ch *str, SizeType length, bool copy)
Definition schema.h:2112
Here is the call graph for this function:

◆ Reset()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
void GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::Reset ( )
inline

Definition at line 1845 of file schema.h.

1845 {
1846 while (!schemaStack_.Empty())
1847 PopSchema();
1848 documentStack_.Clear();
1849 error_.SetObject();
1850 currentError_.SetNull();
1851 missingDependents_.SetNull();
1852 valid_ = true;
1853 }
Here is the caller graph for this function:

◆ StartArray()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StartArray ( )
inline

Definition at line 2136 of file schema.h.

2136 {
2137 RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartArray, (CurrentContext()));
2139 return valid_ = !outputHandler_ || outputHandler_->StartArray();
2140 }
#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)
Definition schema.h:2076
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartDependencyErrors()

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 1986 of file schema.h.

1986 {
1987 currentError_.SetObject();
1988 }

◆ StartDisallowedType()

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 2018 of file schema.h.

2018 {
2019 currentError_.SetArray();
2020 }

◆ StartMissingDependentProperties()

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 1989 of file schema.h.

1989 {
1990 missingDependents_.SetArray();
1991 }

◆ StartMissingProperties()

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 1961 of file schema.h.

1961 {
1962 currentError_.SetArray();
1963 }

◆ StartObject()

template<typename SchemaDocumentType , typename OutputHandler = BaseReaderHandler<typename SchemaDocumentType::SchemaType::EncodingType>, typename StateAllocator = CrtAllocator>
bool GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >::StartObject ( )
inline

Definition at line 2115 of file schema.h.

2115 {
2116 RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartObject, (CurrentContext()));
2118 return valid_ = !outputHandler_ || outputHandler_->StartObject();
2119 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ String()

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 2112 of file schema.h.

2113 { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TooFewItems()

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 1936 of file schema.h.

1936 {
1937 AddNumberError(SchemaType::GetMinItemsString(),
1938 ValueType(actualCount).Move(), SValue(expectedCount).Move());
1939 }
SchemaType::SValue SValue
Definition schema.h:1772

◆ TooFewProperties()

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 1957 of file schema.h.

1957 {
1958 AddNumberError(SchemaType::GetMinPropertiesString(),
1959 ValueType(actualCount).Move(), SValue(expectedCount).Move());
1960 }

◆ TooLong()

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 1917 of file schema.h.

1917 {
1918 AddNumberError(SchemaType::GetMaxLengthString(),
1919 ValueType(str, length, GetStateAllocator()).Move(), SValue(expected).Move());
1920 }

◆ TooManyItems()

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 1940 of file schema.h.

1940 {
1941 AddNumberError(SchemaType::GetMaxItemsString(),
1942 ValueType(actualCount).Move(), SValue(expectedCount).Move());
1943 }

◆ TooManyProperties()

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 1953 of file schema.h.

1953 {
1954 AddNumberError(SchemaType::GetMaxPropertiesString(),
1955 ValueType(actualCount).Move(), SValue(expectedCount).Move());
1956 }

◆ TooShort()

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 1921 of file schema.h.

1921 {
1922 AddNumberError(SchemaType::GetMinLengthString(),
1923 ValueType(str, length, GetStateAllocator()).Move(), SValue(expected).Move());
1924 }

◆ Uint()

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 2106 of file schema.h.

2106{ RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint, (CurrentContext(), u), (u)); }
bool Uint(unsigned u)
Definition schema.h:2106
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Uint64()

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 2108 of file schema.h.

2108{ RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint64, (CurrentContext(), u), (u)); }
bool Uint64(uint64_t u)
Definition schema.h:2108
Here is the call graph for this function:
Here is the caller graph for this function:

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