RetroArch
Classes | Public Types | Public Member Functions | 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>

Collaboration diagram for internal::Schema< SchemaDocumentType >:
[legend]

Classes

struct  PatternProperty
 
struct  Property
 
struct  SchemaArray
 

Public Types

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

Public Member Functions

 Schema (SchemaDocumentType *schemaDocument, const PointerType &p, const ValueType &value, const ValueType &document, AllocatorType *allocator)
 
 ~Schema ()
 
bool BeginValue (Context &context) const
 
RAPIDJSON_FORCEINLINE bool EndValue (Context &context) const
 
bool Null (Context &context) const
 
bool Bool (Context &context, bool) const
 
bool Int (Context &context, int i) const
 
bool Uint (Context &context, unsigned u) const
 
bool Int64 (Context &context, int64_t i) const
 
bool Uint64 (Context &context, uint64_t u) const
 
bool Double (Context &context, double d) const
 
bool String (Context &context, const Ch *str, SizeType length, bool) const
 
bool StartObject (Context &context) const
 
bool Key (Context &context, const Ch *str, SizeType len, bool) const
 
bool EndObject (Context &context, SizeType memberCount) const
 
bool StartArray (Context &context) const
 
bool EndArray (Context &context, SizeType elementCount) const
 

Private Types

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

Private Member Functions

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)
 
template<typename ValueType >
RegexTypeCreatePattern (const ValueType &value)
 
void AddType (const ValueType &type)
 
bool CreateParallelValidator (Context &context) const
 
void CreateSchemaValidators (Context &context, const SchemaArray &schemas) const
 
bool FindPropertyIndex (const ValueType &name, SizeType *outIndex) const
 
bool CheckInt (Context &context, int64_t i) const
 
bool CheckUint (Context &context, uint64_t i) const
 
bool CheckDoubleMinimum (Context &context, double d) const
 
bool CheckDoubleMaximum (Context &context, double d) const
 
bool CheckDoubleMultipleOf (Context &context, double d) const
 

Static Private Member Functions

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

Private Attributes

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

Friends

class GenericSchemaDocument< ValueType, AllocatorType >
 

Member Typedef Documentation

◆ AllocatorType

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

◆ Ch

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

◆ Context

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

◆ EncodingType

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

◆ PointerType

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

◆ RegexType

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

◆ SchemaType

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

◆ SValue

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

◆ ValueType

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

Member Enumeration Documentation

◆ SchemaValueType

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

Constructor & Destructor Documentation

◆ Schema()

template<typename SchemaDocumentType >
internal::Schema< SchemaDocumentType >::Schema ( SchemaDocumentType *  schemaDocument,
const PointerType p,
const ValueType value,
const ValueType document,
AllocatorType allocator 
)
inline
Here is the call graph for this function:

◆ ~Schema()

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

Member Function Documentation

◆ AddType()

template<typename SchemaDocumentType >
void internal::Schema< SchemaDocumentType >::AddType ( const ValueType type)
inlineprivate
Here is the caller graph for this function:

◆ AddUniqueElement()

template<typename SchemaDocumentType >
template<typename V1 , typename V2 >
void internal::Schema< SchemaDocumentType >::AddUniqueElement ( V1 &  a,
const V2 &  v 
)
inlineprivate
Here is the caller graph for this function:

◆ AssignIfExist() [1/3]

template<typename SchemaDocumentType >
static void internal::Schema< SchemaDocumentType >::AssignIfExist ( bool out,
const ValueType value,
const ValueType name 
)
inlinestaticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AssignIfExist() [2/3]

template<typename SchemaDocumentType >
static void internal::Schema< SchemaDocumentType >::AssignIfExist ( SizeType out,
const ValueType value,
const ValueType name 
)
inlinestaticprivate
Here is the call graph for this function:

◆ AssignIfExist() [3/3]

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
Here is the call graph for this function:

◆ BeginValue()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::BeginValue ( Context context) const
inline
Here is the call graph for this function:

◆ Bool()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Bool ( Context context,
bool   
) const
inline
Here is the call graph for this function:

◆ CheckDoubleMaximum()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckDoubleMaximum ( Context context,
double  d 
) const
inlineprivate
Here is the caller graph for this function:

◆ CheckDoubleMinimum()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckDoubleMinimum ( Context context,
double  d 
) const
inlineprivate
Here is the caller graph for this function:

◆ CheckDoubleMultipleOf()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckDoubleMultipleOf ( Context context,
double  d 
) const
inlineprivate
Here is the caller graph for this function:

◆ CheckInt()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckInt ( Context context,
int64_t  i 
) const
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckUint()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CheckUint ( Context context,
uint64_t  i 
) const
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateParallelValidator()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::CreateParallelValidator ( Context context) const
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreatePattern()

template<typename SchemaDocumentType >
template<typename ValueType >
RegexType* internal::Schema< SchemaDocumentType >::CreatePattern ( const ValueType value)
inlineprivate
Here is the caller graph for this function:

◆ CreateSchemaValidators()

template<typename SchemaDocumentType >
void internal::Schema< SchemaDocumentType >::CreateSchemaValidators ( Context context,
const SchemaArray schemas 
) const
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Double()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Double ( Context context,
double  d 
) const
inline
Here is the call graph for this function:

◆ EndArray()

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

◆ EndObject()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::EndObject ( Context context,
SizeType  memberCount 
) const
inline
Here is the call graph for this function:

◆ EndValue()

template<typename SchemaDocumentType >
RAPIDJSON_FORCEINLINE bool internal::Schema< SchemaDocumentType >::EndValue ( Context context) const
inline
Here is the call graph for this function:

◆ FindPropertyIndex()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::FindPropertyIndex ( const ValueType name,
SizeType outIndex 
) const
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMember()

template<typename SchemaDocumentType >
static const ValueType* internal::Schema< SchemaDocumentType >::GetMember ( const ValueType value,
const ValueType name 
)
inlinestaticprivate
Here is the caller graph for this function:

◆ GetTypeless()

template<typename SchemaDocumentType >
static const SchemaType* internal::Schema< SchemaDocumentType >::GetTypeless ( )
inlinestaticprivate
Here is the caller graph for this function:

◆ Int()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Int ( Context context,
int  i 
) const
inline
Here is the call graph for this function:

◆ Int64()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Int64 ( Context context,
int64_t  i 
) const
inline
Here is the call graph for this function:

◆ IsPatternMatch()

template<typename SchemaDocumentType >
static bool internal::Schema< SchemaDocumentType >::IsPatternMatch ( const RegexType pattern,
const Ch str,
SizeType   
)
inlinestaticprivate
Here is the caller graph for this function:

◆ Key()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Key ( Context context,
const Ch str,
SizeType  len,
bool   
) const
inline
Here is the call graph for this function:

◆ Null()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Null ( Context context) const
inline
Here is the call graph for this function:

◆ StartArray()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::StartArray ( Context context) const
inline
Here is the call graph for this function:

◆ StartObject()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::StartObject ( Context context) const
inline
Here is the call graph for this function:

◆ String()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::String ( Context context,
const Ch str,
SizeType  length,
bool   
) const
inline
Here is the call graph for this function:

◆ Uint()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Uint ( Context context,
unsigned  u 
) const
inline
Here is the call graph for this function:

◆ Uint64()

template<typename SchemaDocumentType >
bool internal::Schema< SchemaDocumentType >::Uint64 ( Context context,
uint64_t  u 
) const
inline
Here is the call graph for this function:

Friends And Related Function Documentation

◆ GenericSchemaDocument< ValueType, AllocatorType >

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

Member Data Documentation

◆ additionalItems_

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

◆ additionalItemsSchema_

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

◆ additionalProperties_

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

◆ additionalPropertiesSchema_

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

◆ allocator_

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

◆ allOf_

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

◆ anyOf_

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

◆ enum_

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

◆ enumCount_

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

◆ exclusiveMaximum_

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

◆ exclusiveMinimum_

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

◆ hasDependencies_

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

◆ hasRequired_

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

◆ hasSchemaDependencies_

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

◆ itemsList_

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

◆ itemsTuple_

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

◆ itemsTupleCount_

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

◆ maximum_

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

◆ maxItems_

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

◆ maxLength_

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

◆ maxProperties_

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

◆ minimum_

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

◆ minItems_

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

◆ minLength_

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

◆ minProperties_

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

◆ multipleOf_

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

◆ not_

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

◆ notValidatorIndex_

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

◆ oneOf_

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

◆ pattern_

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

◆ patternProperties_

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

◆ patternPropertyCount_

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

◆ properties_

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

◆ propertyCount_

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

◆ type_

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

◆ uniqueItems_

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

◆ validatorCount_

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

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