Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
schema.h File Reference
#include "document.h"
#include "pointer.h"
#include "stringbuffer.h"
#include <cmath>
#include "internal/regex.h"
Include dependency graph for schema.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  internal::ISchemaValidator
 
class  internal::ISchemaStateFactory< SchemaType >
 
class  internal::IValidationErrorHandler< SchemaType >
 
class  internal::Hasher< Encoding, Allocator >
 
union  internal::Hasher< Encoding, Allocator >::Number::U
 
struct  internal::SchemaValidationContext< SchemaDocumentType >
 
class  internal::Schema< SchemaDocumentType >
 
struct  internal::TokenHelper< Stack, Ch >
 
struct  internal::TokenHelper< Stack, char >
 
class  IGenericRemoteSchemaDocumentProvider< SchemaDocumentType >
 
class  GenericSchemaDocument< ValueT, Allocator >
 JSON schema document. More...
 
class  GenericSchemaValidator< SchemaDocumentType, OutputHandler, StateAllocator >
 JSON Schema Validator. More...
 
class  SchemaValidatingReader< parseFlags, InputStream, SourceEncoding, SchemaDocumentType, StackAllocator >
 A helper class for parsing with validation. More...
 

Namespaces

namespace  internal
 

Macros

#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX   1
 
#define RAPIDJSON_SCHEMA_USE_STDREGEX   0
 
#define RAPIDJSON_SCHEMA_HAS_REGEX   1
 
#define RAPIDJSON_SCHEMA_VERBOSE   0
 
#define RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword)
 
#define RAPIDJSON_INVALID_KEYWORD_RETURN(keyword)
 
#define RAPIDJSON_STRING_(name, ...)
 
#define RAPIDJSON_STRING_(name, ...)
 
#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_()
 
#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)
 
#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)
 
#define RAPIDJSON_SCHEMA_HANDLE_END_(method, arg2)
 
#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2)
 

Typedefs

typedef GenericSchemaDocument< ValueSchemaDocument
 GenericSchemaDocument using Value type.
 
typedef IGenericRemoteSchemaDocumentProvider< SchemaDocumentIRemoteSchemaDocumentProvider
 IGenericRemoteSchemaDocumentProvider using SchemaDocument.
 
typedef GenericSchemaValidator< SchemaDocumentSchemaValidator
 

Macro Definition Documentation

◆ RAPIDJSON_INVALID_KEYWORD_RETURN

#define RAPIDJSON_INVALID_KEYWORD_RETURN ( keyword)
Value:
RAPIDJSON_MULTILINEMACRO_BEGIN\
context.invalidKeyword = keyword.GetString();\
RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword.GetString());\
return false;\
RAPIDJSON_MULTILINEMACRO_END

Definition at line 116 of file schema.h.

116#define RAPIDJSON_INVALID_KEYWORD_RETURN(keyword)\
117RAPIDJSON_MULTILINEMACRO_BEGIN\
118 context.invalidKeyword = keyword.GetString();\
119 RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword.GetString());\
120 return false;\
121RAPIDJSON_MULTILINEMACRO_END

◆ RAPIDJSON_INVALID_KEYWORD_VERBOSE

#define RAPIDJSON_INVALID_KEYWORD_VERBOSE ( keyword)

Definition at line 113 of file schema.h.

◆ RAPIDJSON_SCHEMA_HANDLE_BEGIN_

#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_ ( method,
arg1 )
Value:
if (!valid_) return false; \
if (!BeginValue() || !CurrentSchema().method arg1) {\
RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_();\
return valid_ = false;\
}

Definition at line 2076 of file schema.h.

2076#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)\
2077 if (!valid_) return false; \
2078 if (!BeginValue() || !CurrentSchema().method arg1) {\
2079 RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_();\
2080 return valid_ = false;\
2081 }

◆ RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_

#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_ ( )

Definition at line 2073 of file schema.h.

◆ RAPIDJSON_SCHEMA_HANDLE_END_

#define RAPIDJSON_SCHEMA_HANDLE_END_ ( method,
arg2 )
Value:
return valid_ = EndValue() && (!outputHandler_ || outputHandler_->method arg2)

Definition at line 2095 of file schema.h.

2095#define RAPIDJSON_SCHEMA_HANDLE_END_(method, arg2)\
2096 return valid_ = EndValue() && (!outputHandler_ || outputHandler_->method arg2)

◆ RAPIDJSON_SCHEMA_HANDLE_PARALLEL_

#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_ ( method,
arg2 )
Value:
for (Context* context = schemaStack_.template Bottom<Context>(); context != schemaStack_.template End<Context>(); context++) {\
if (context->hasher)\
static_cast<HasherType*>(context->hasher)->method arg2;\
if (context->validators)\
for (SizeType i_ = 0; i_ < context->validatorCount; i_++)\
static_cast<GenericSchemaValidator*>(context->validators[i_])->method arg2;\
if (context->patternPropertiesValidators)\
for (SizeType i_ = 0; i_ < context->patternPropertiesValidatorCount; i_++)\
static_cast<GenericSchemaValidator*>(context->patternPropertiesValidators[i_])->method arg2;\
}
JSON Schema Validator.
Definition schema.h:1767
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition rapidjson.h:384

Definition at line 2083 of file schema.h.

2083#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)\
2084 for (Context* context = schemaStack_.template Bottom<Context>(); context != schemaStack_.template End<Context>(); context++) {\
2085 if (context->hasher)\
2086 static_cast<HasherType*>(context->hasher)->method arg2;\
2087 if (context->validators)\
2088 for (SizeType i_ = 0; i_ < context->validatorCount; i_++)\
2089 static_cast<GenericSchemaValidator*>(context->validators[i_])->method arg2;\
2090 if (context->patternPropertiesValidators)\
2091 for (SizeType i_ = 0; i_ < context->patternPropertiesValidatorCount; i_++)\
2092 static_cast<GenericSchemaValidator*>(context->patternPropertiesValidators[i_])->method arg2;\
2093 }

◆ RAPIDJSON_SCHEMA_HANDLE_VALUE_

#define RAPIDJSON_SCHEMA_HANDLE_VALUE_ ( method,
arg1,
arg2 )
Value:
RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2);\
RAPIDJSON_SCHEMA_HANDLE_END_ (method, arg2)
#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)
Definition schema.h:2076

Definition at line 2098 of file schema.h.

2098#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2) \
2099 RAPIDJSON_SCHEMA_HANDLE_BEGIN_ (method, arg1);\
2100 RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2);\
2101 RAPIDJSON_SCHEMA_HANDLE_END_ (method, arg2)

◆ RAPIDJSON_SCHEMA_HAS_REGEX

#define RAPIDJSON_SCHEMA_HAS_REGEX   1

Definition at line 42 of file schema.h.

◆ RAPIDJSON_SCHEMA_USE_INTERNALREGEX

#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX   1

Definition at line 24 of file schema.h.

◆ RAPIDJSON_SCHEMA_USE_STDREGEX

#define RAPIDJSON_SCHEMA_USE_STDREGEX   0

Definition at line 32 of file schema.h.

◆ RAPIDJSON_SCHEMA_VERBOSE

#define RAPIDJSON_SCHEMA_VERBOSE   0

Definition at line 48 of file schema.h.

◆ RAPIDJSON_STRING_ [1/2]

#define RAPIDJSON_STRING_ ( name,
... )
Value:
static const ValueType& Get##name##String() {\
static const Ch s[] = { __VA_ARGS__, '\0' };\
static const ValueType v(s, static_cast<SizeType>(sizeof(s) / sizeof(Ch) - 1));\
return v;\
}
std::string name
#define Ch(x, y, z)
Definition hash_impl.h:17
char * s

Definition at line 1017 of file schema.h.

1017#define RAPIDJSON_STRING_(name, ...) \
1018 static const ValueType& Get##name##String() {\
1019 static const Ch s[] = { __VA_ARGS__, '\0' };\
1020 static const ValueType v(s, static_cast<SizeType>(sizeof(s) / sizeof(Ch) - 1));\
1021 return v;\
1022 }

◆ RAPIDJSON_STRING_ [2/2]

#define RAPIDJSON_STRING_ ( name,
... )
Value:
static const StringRefType& Get##name##String() {\
static const Ch s[] = { __VA_ARGS__, '\0' };\
static const StringRefType v(s, static_cast<SizeType>(sizeof(s) / sizeof(Ch) - 1)); \
return v;\
}

Definition at line 1017 of file schema.h.

1017#define RAPIDJSON_STRING_(name, ...) \
1018 static const ValueType& Get##name##String() {\
1019 static const Ch s[] = { __VA_ARGS__, '\0' };\
1020 static const ValueType v(s, static_cast<SizeType>(sizeof(s) / sizeof(Ch) - 1));\
1021 return v;\
1022 }

Typedef Documentation

◆ IRemoteSchemaDocumentProvider

◆ SchemaDocument

Definition at line 1740 of file schema.h.

◆ SchemaValidator

Definition at line 2416 of file schema.h.