Classes | Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
internal::Schema< SchemaDocumentType > Class Template Reference

#include <schema.h>

Classes

struct  PatternProperty
 
struct  Property
 
struct  SchemaArray
 

Public Types

typedef SchemaDocumentType::AllocatorType AllocatorType
 
typedef EncodingType::Ch Ch
 
typedef SchemaValidationContext< SchemaDocumentType > Context
 
typedef ValueType::EncodingType EncodingType
 
typedef IValidationErrorHandler< SchemaErrorHandler
 
typedef SchemaDocumentType::PointerType PointerType
 
typedef Schema< SchemaDocumentType > SchemaType
 
typedef GenericValue< EncodingType, AllocatorTypeSValue
 
typedef SchemaDocumentType::ValueType ValueType
 

Public Member Functions

bool BeginValue (Context &context) const
 
bool Bool (Context &context, bool) const
 
bool Double (Context &context, double d) const
 
bool EndArray (Context &context, SizeType elementCount) const
 
bool EndObject (Context &context, SizeType memberCount) const
 
RAPIDJSON_FORCEINLINE bool EndValue (Context &context) const
 
const PointerTypeGetPointer () const
 
const SValueGetURI () const
 
bool Int (Context &context, int i) const
 
bool Int64 (Context &context, int64_t i) const
 
bool Key (Context &context, const Ch *str, SizeType len, bool) const
 
bool Null (Context &context) const
 
 RAPIDJSON_STRING_ (PatternProperties, 'p', 'a', 't', 't', 'e', 'r', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's') RAPIDJSON_STRING_(AdditionalProperties
 
 Schema (SchemaDocumentType *schemaDocument, const PointerType &p, const ValueType &value, const ValueType &document, AllocatorType *allocator)
 
bool StartArray (Context &context) const
 
bool StartObject (Context &context) const
 
bool String (Context &context, const Ch *str, SizeType length, bool) const
 
bool Uint (Context &context, unsigned u) const
 
bool Uint64 (Context &context, uint64_t u) const
 
 ~Schema ()
 

Public Attributes

 a
 
 d
 
 e
 
 i
 
 l
 
 n
 
 o
 
 p
 
 P
 
 r
 
 t
 

Private Types

typedef internal::GenericRegex< EncodingType, AllocatorTypeRegexType
 
enum  SchemaValueType {
  kNullSchemaType, kBooleanSchemaType, kObjectSchemaType, kArraySchemaType,
  kStringSchemaType, kNumberSchemaType, kIntegerSchemaType, kTotalSchemaType
}
 

Private Member Functions

void AddType (const ValueType &type)
 
template<typename V1 , typename V2 >
void AddUniqueElement (V1 &a, const V2 &v)
 
void AssignIfExist (SchemaArray &out, SchemaDocumentType &schemaDocument, const PointerType &p, const ValueType &value, const ValueType &name, const ValueType &document)
 
bool CheckDoubleMaximum (Context &context, double d) const
 
bool CheckDoubleMinimum (Context &context, double d) const
 
bool CheckDoubleMultipleOf (Context &context, double d) const
 
bool CheckInt (Context &context, int64_t i) const
 
bool CheckUint (Context &context, uint64_t i) const
 
bool CreateParallelValidator (Context &context) const
 
template<typename ValueType >
RegexTypeCreatePattern (const ValueType &value)
 
void CreateSchemaValidators (Context &context, const SchemaArray &schemas) const
 
void DisallowedType (Context &context, const ValueType &actualType) const
 
bool FindPropertyIndex (const ValueType &name, SizeType *outIndex) const
 

Static Private Member Functions

static void AssignIfExist (bool &out, const ValueType &value, const ValueType &name)
 
static void AssignIfExist (SizeType &out, const ValueType &value, const ValueType &name)
 
static const ValueTypeGetMember (const ValueType &value, const ValueType &name)
 
static bool IsPatternMatch (const RegexType *pattern, const Ch *str, SizeType)
 

Private Attributes

bool additionalItems_
 
const SchemaTypeadditionalItemsSchema_
 
bool additionalProperties_
 
const SchemaTypeadditionalPropertiesSchema_
 
AllocatorTypeallocator_
 
SchemaArray allOf_
 
SchemaArray anyOf_
 
SizeType defaultValueLength_
 
uint64_tenum_
 
SizeType enumCount_
 
bool exclusiveMaximum_
 
bool exclusiveMinimum_
 
bool hasDependencies_
 
bool hasRequired_
 
bool hasSchemaDependencies_
 
const SchemaTypeitemsList_
 
const SchemaType ** itemsTuple_
 
SizeType itemsTupleCount_
 
SValue maximum_
 
SizeType maxItems_
 
SizeType maxLength_
 
SizeType maxProperties_
 
SValue minimum_
 
SizeType minItems_
 
SizeType minLength_
 
SizeType minProperties_
 
SValue multipleOf_
 
const SchemaTypenot_
 
SizeType notValidatorIndex_
 
SchemaArray oneOf_
 
RegexTypepattern_
 
PatternPropertypatternProperties_
 
SizeType patternPropertyCount_
 
PointerType pointer_
 
Propertyproperties_
 
SizeType propertyCount_
 
unsigned type_
 
const SchemaTypetypeless_
 
bool uniqueItems_
 
SValue uri_
 
SizeType validatorCount_
 

Friends

class GenericSchemaDocument< ValueType, AllocatorType >
 

Detailed Description

template<typename SchemaDocumentType>
class internal::Schema< SchemaDocumentType >

Definition at line 139 of file schema.h.

Member Typedef Documentation

template<typename SchemaDocumentType >
typedef SchemaDocumentType::AllocatorType internal::Schema< SchemaDocumentType >::AllocatorType

Definition at line 483 of file schema.h.

template<typename SchemaDocumentType >
typedef EncodingType::Ch internal::Schema< SchemaDocumentType >::Ch

Definition at line 486 of file schema.h.

template<typename SchemaDocumentType >
typedef SchemaValidationContext<SchemaDocumentType> internal::Schema< SchemaDocumentType >::Context

Definition at line 487 of file schema.h.

template<typename SchemaDocumentType >
typedef ValueType::EncodingType internal::Schema< SchemaDocumentType >::EncodingType

Definition at line 485 of file schema.h.

template<typename SchemaDocumentType >
typedef IValidationErrorHandler<Schema> internal::Schema< SchemaDocumentType >::ErrorHandler

Definition at line 490 of file schema.h.

template<typename SchemaDocumentType >
typedef SchemaDocumentType::PointerType internal::Schema< SchemaDocumentType >::PointerType

Definition at line 484 of file schema.h.

template<typename SchemaDocumentType >
typedef internal::GenericRegex<EncodingType, AllocatorType> internal::Schema< SchemaDocumentType >::RegexType
private

Definition at line 1266 of file schema.h.

template<typename SchemaDocumentType >
typedef Schema<SchemaDocumentType> internal::Schema< SchemaDocumentType >::SchemaType

Definition at line 488 of file schema.h.

template<typename SchemaDocumentType >
typedef GenericValue<EncodingType, AllocatorType> internal::Schema< SchemaDocumentType >::SValue

Definition at line 489 of file schema.h.

template<typename SchemaDocumentType >
typedef SchemaDocumentType::ValueType internal::Schema< SchemaDocumentType >::ValueType

Definition at line 482 of file schema.h.

Member Enumeration Documentation

template<typename SchemaDocumentType >
enum internal::Schema::SchemaValueType
private
Enumerator
kNullSchemaType 
kBooleanSchemaType 
kObjectSchemaType 
kArraySchemaType 
kStringSchemaType 
kNumberSchemaType 
kIntegerSchemaType 
kTotalSchemaType 

Definition at line 1253 of file schema.h.

Constructor & Destructor Documentation

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::Schema ( SchemaDocumentType *  schemaDocument,
const PointerType p,
const ValueType value,
const ValueType document,
AllocatorType allocator 
)
inline

Definition at line 493 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::~Schema ( )
inline

Definition at line 763 of file schema.h.

Member Function Documentation

template<typename SchemaDocumentType >
void internal::Schema< SchemaDocumentType >::AddType ( const ValueType type)
inlineprivate

Definition at line 1397 of file schema.h.

template<typename SchemaDocumentType >
template<typename V1 , typename V2 >
void internal::Schema< SchemaDocumentType >::AddUniqueElement ( V1 &  a,
const V2 &  v 
)
inlineprivate

Definition at line 1288 of file schema.h.

template<typename SchemaDocumentType >
static void internal::Schema< SchemaDocumentType >::AssignIfExist ( bool &  out,
const ValueType value,
const ValueType name 
)
inlinestaticprivate

Definition at line 1303 of file schema.h.

template<typename SchemaDocumentType >
static void internal::Schema< SchemaDocumentType >::AssignIfExist ( SizeType out,
const ValueType value,
const ValueType name 
)
inlinestaticprivate

Definition at line 1310 of file schema.h.

template<typename SchemaDocumentType >
void internal::Schema< SchemaDocumentType >::AssignIfExist ( SchemaArray out,
SchemaDocumentType &  schemaDocument,
const PointerType p,
const ValueType value,
const ValueType name,
const ValueType document 
)
inlineprivate

Definition at line 1317 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::BeginValue ( Context context) const
inline

Definition at line 798 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Bool ( Context context,
bool   
) const
inline

Definition at line 938 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckDoubleMaximum ( Context context,
double  d 
) const
inlineprivate

Definition at line 1604 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckDoubleMinimum ( Context context,
double  d 
) const
inlineprivate

Definition at line 1594 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckDoubleMultipleOf ( Context context,
double  d 
) const
inlineprivate

Definition at line 1614 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckInt ( Context context,
int64_t  i 
) const
inlineprivate

Definition at line 1472 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckUint ( Context context,
uint64_t  i 
) const
inlineprivate

Definition at line 1534 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CreateParallelValidator ( Context context) const
inlineprivate

Definition at line 1415 of file schema.h.

template<typename SchemaDocumentType >
template<typename ValueType >
RegexType* internal::Schema< SchemaDocumentType >::CreatePattern ( const ValueType value)
inlineprivate

Definition at line 1338 of file schema.h.

template<typename SchemaDocumentType >
void internal::Schema< SchemaDocumentType >::CreateSchemaValidators ( Context context,
const SchemaArray schemas 
) const
inlineprivate

Definition at line 1451 of file schema.h.

template<typename SchemaDocumentType >
void internal::Schema< SchemaDocumentType >::DisallowedType ( Context context,
const ValueType actualType 
) const
inlineprivate

Definition at line 1627 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Double ( Context context,
double  d 
) const
inline

Definition at line 976 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::EndArray ( Context context,
SizeType  elementCount 
) const
inline

Definition at line 1185 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::EndObject ( Context context,
SizeType  memberCount 
) const
inline

Definition at line 1115 of file schema.h.

template<typename SchemaDocumentType >
RAPIDJSON_FORCEINLINE bool internal::Schema< SchemaDocumentType >::EndValue ( Context context) const
inline

Definition at line 829 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::FindPropertyIndex ( const ValueType name,
SizeType outIndex 
) const
inlineprivate

Definition at line 1458 of file schema.h.

template<typename SchemaDocumentType >
static const ValueType* internal::Schema< SchemaDocumentType >::GetMember ( const ValueType value,
const ValueType name 
)
inlinestaticprivate

Definition at line 1297 of file schema.h.

template<typename SchemaDocumentType >
const PointerType& internal::Schema< SchemaDocumentType >::GetPointer ( ) const
inline

Definition at line 793 of file schema.h.

template<typename SchemaDocumentType >
const SValue& internal::Schema< SchemaDocumentType >::GetURI ( ) const
inline

Definition at line 788 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Int ( Context context,
int  i 
) const
inline

Definition at line 948 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Int64 ( Context context,
int64_t  i 
) const
inline

Definition at line 962 of file schema.h.

template<typename SchemaDocumentType >
static bool internal::Schema< SchemaDocumentType >::IsPatternMatch ( const RegexType pattern,
const Ch str,
SizeType   
)
inlinestaticprivate

Definition at line 1354 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Key ( Context context,
const Ch str,
SizeType  len,
bool   
) const
inline

Definition at line 1057 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Null ( Context context) const
inline

Definition at line 928 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::RAPIDJSON_STRING_ ( PatternProperties  ,
'p ,
'a ,
't ,
't ,
'e ,
'r ,
'n ,
'P ,
'r ,
'o ,
'p ,
'e ,
'r ,
't ,
'i ,
'e ,
's  
)
template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::StartArray ( Context context) const
inline

Definition at line 1171 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::StartObject ( Context context) const
inline

Definition at line 1031 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::String ( Context context,
const Ch str,
SizeType  length,
bool   
) const
inline

Definition at line 996 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Uint ( Context context,
unsigned  u 
) const
inline

Definition at line 955 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Uint64 ( Context context,
uint64_t  u 
) const
inline

Definition at line 969 of file schema.h.

Friends And Related Function Documentation

template<typename SchemaDocumentType >
friend class GenericSchemaDocument< ValueType, AllocatorType >
friend

Definition at line 491 of file schema.h.

Member Data Documentation

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::a

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::additionalItems_
private

Definition at line 1717 of file schema.h.

template<typename SchemaDocumentType >
const SchemaType* internal::Schema< SchemaDocumentType >::additionalItemsSchema_
private

Definition at line 1711 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::additionalProperties_
private

Definition at line 1706 of file schema.h.

template<typename SchemaDocumentType >
const SchemaType* internal::Schema< SchemaDocumentType >::additionalPropertiesSchema_
private

Definition at line 1700 of file schema.h.

template<typename SchemaDocumentType >
AllocatorType* internal::Schema< SchemaDocumentType >::allocator_
private

Definition at line 1685 of file schema.h.

template<typename SchemaDocumentType >
SchemaArray internal::Schema< SchemaDocumentType >::allOf_
private

Definition at line 1691 of file schema.h.

template<typename SchemaDocumentType >
SchemaArray internal::Schema< SchemaDocumentType >::anyOf_
private

Definition at line 1692 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::d

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::defaultValueLength_
private

Definition at line 1730 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::e

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
uint64_t* internal::Schema< SchemaDocumentType >::enum_
private

Definition at line 1689 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::enumCount_
private

Definition at line 1690 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::exclusiveMaximum_
private

Definition at line 1728 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::exclusiveMinimum_
private

Definition at line 1727 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::hasDependencies_
private

Definition at line 1707 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::hasRequired_
private

Definition at line 1708 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::hasSchemaDependencies_
private

Definition at line 1709 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::i

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
const SchemaType* internal::Schema< SchemaDocumentType >::itemsList_
private

Definition at line 1712 of file schema.h.

template<typename SchemaDocumentType >
const SchemaType** internal::Schema< SchemaDocumentType >::itemsTuple_
private

Definition at line 1713 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::itemsTupleCount_
private

Definition at line 1714 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::l

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
SValue internal::Schema< SchemaDocumentType >::maximum_
private

Definition at line 1725 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::maxItems_
private

Definition at line 1716 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::maxLength_
private

Definition at line 1722 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::maxProperties_
private

Definition at line 1705 of file schema.h.

template<typename SchemaDocumentType >
SValue internal::Schema< SchemaDocumentType >::minimum_
private

Definition at line 1724 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::minItems_
private

Definition at line 1715 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::minLength_
private

Definition at line 1721 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::minProperties_
private

Definition at line 1704 of file schema.h.

template<typename SchemaDocumentType >
SValue internal::Schema< SchemaDocumentType >::multipleOf_
private

Definition at line 1726 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::n

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
const SchemaType* internal::Schema< SchemaDocumentType >::not_
private

Definition at line 1694 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::notValidatorIndex_
private

Definition at line 1697 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::o

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
SchemaArray internal::Schema< SchemaDocumentType >::oneOf_
private

Definition at line 1693 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::P

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::p

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
RegexType* internal::Schema< SchemaDocumentType >::pattern_
private

Definition at line 1720 of file schema.h.

template<typename SchemaDocumentType >
PatternProperty* internal::Schema< SchemaDocumentType >::patternProperties_
private

Definition at line 1701 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::patternPropertyCount_
private

Definition at line 1702 of file schema.h.

template<typename SchemaDocumentType >
PointerType internal::Schema< SchemaDocumentType >::pointer_
private

Definition at line 1687 of file schema.h.

template<typename SchemaDocumentType >
Property* internal::Schema< SchemaDocumentType >::properties_
private

Definition at line 1699 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::propertyCount_
private

Definition at line 1703 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::r

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::t

Definition at line 1231 of file schema.h.

template<typename SchemaDocumentType >
unsigned internal::Schema< SchemaDocumentType >::type_
private

Definition at line 1695 of file schema.h.

template<typename SchemaDocumentType >
const SchemaType* internal::Schema< SchemaDocumentType >::typeless_
private

Definition at line 1688 of file schema.h.

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::uniqueItems_
private

Definition at line 1718 of file schema.h.

template<typename SchemaDocumentType >
SValue internal::Schema< SchemaDocumentType >::uri_
private

Definition at line 1686 of file schema.h.

template<typename SchemaDocumentType >
SizeType internal::Schema< SchemaDocumentType >::validatorCount_
private

Definition at line 1696 of file schema.h.


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


xbot_talker
Author(s): wangxiaoyun
autogenerated on Sat Oct 10 2020 03:27:54