Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
schema.h File Reference
#include "document.h"
#include "pointer.h"
#include "stringbuffer.h"
#include "error/en.h"
#include "uri.h"
#include <cmath>
#include "internal/regex.h"
+ Include dependency graph for schema.h:

Go to the source code of this file.

Classes

class  GenericSchemaDocument< ValueT, Allocator >
 JSON schema document. More...
 
class  internal::Schema< SchemaDocumentType >
 
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

 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(code)
 
#define RAPIDJSON_VALIDATE_DEFAULT_FLAGS   kValidateNoFlags
 User-defined kValidateDefaultFlags definition. More...
 
#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. More...
 
typedef IGenericRemoteSchemaDocumentProvider< SchemaDocumentIRemoteSchemaDocumentProvider
 IGenericRemoteSchemaDocumentProvider using SchemaDocument. More...
 
typedef GenericSchemaValidator< SchemaDocumentSchemaValidator
 

Enumerations

enum  ValidateFlag { kValidateNoFlags = 0, kValidateContinueOnErrorFlag = 1, kValidateDefaultFlags = RAPIDJSON_VALIDATE_DEFAULT_FLAGS }
 Combination of validate flags. More...
 

Macro Definition Documentation

◆ RAPIDJSON_INVALID_KEYWORD_RETURN

#define RAPIDJSON_INVALID_KEYWORD_RETURN (   code)
Value:
RAPIDJSON_MULTILINEMACRO_BEGIN\
context.invalidCode = code;\
context.invalidKeyword = SchemaType::GetValidateErrorKeyword(code).GetString();\
RAPIDJSON_INVALID_KEYWORD_VERBOSE(context.invalidKeyword);\
return false;\
RAPIDJSON_MULTILINEMACRO_END

◆ RAPIDJSON_INVALID_KEYWORD_VERBOSE

#define RAPIDJSON_INVALID_KEYWORD_VERBOSE (   keyword)

◆ RAPIDJSON_SCHEMA_HANDLE_BEGIN_

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

◆ RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_

#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_ ( )

◆ RAPIDJSON_SCHEMA_HANDLE_END_

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

◆ 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;\
}

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

◆ RAPIDJSON_SCHEMA_HAS_REGEX

#define RAPIDJSON_SCHEMA_HAS_REGEX   1

◆ RAPIDJSON_SCHEMA_USE_INTERNALREGEX

#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX   1

◆ RAPIDJSON_SCHEMA_USE_STDREGEX

#define RAPIDJSON_SCHEMA_USE_STDREGEX   0

◆ RAPIDJSON_SCHEMA_VERBOSE

#define RAPIDJSON_SCHEMA_VERBOSE   0

◆ 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;\
}

◆ 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;\
}

Typedef Documentation

◆ IRemoteSchemaDocumentProvider

◆ SchemaDocument

◆ SchemaValidator

Enumeration Type Documentation

◆ ValidateFlag

Combination of validate flags.

See also
Enumerator
kValidateNoFlags 

No flags are set.

kValidateContinueOnErrorFlag 

Don't stop after first validation error.

kValidateDefaultFlags 

Default validate flags. Can be customized by defining RAPIDJSON_VALIDATE_DEFAULT_FLAGS.

SizeType
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:415
Blam::Globals::String
@ String
Represents a std::string.
Definition: globals.h:48
RAPIDJSON_SCHEMA_HANDLE_BEGIN_
#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)
Definition: schema.h:2348
GenericSchemaValidator
JSON Schema Validator.
Definition: fwd.h:145
name
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font name
Definition: ARPHICPL.TXT:16