MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / CreateParallelValidator

Method CreateParallelValidator

rapidjson/schema.h:1049–1078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1047 }
1048
1049 bool CreateParallelValidator(Context& context) const {
1050 if (enum_ || context.arrayUniqueness)
1051 context.hasher = context.factory.CreateHasher();
1052
1053 if (validatorCount_) {
1054 RAPIDJSON_ASSERT(context.validators == 0);
1055 context.validators = static_cast<ISchemaValidator**>(context.factory.MallocState(sizeof(ISchemaValidator*) * validatorCount_));
1056 context.validatorCount = validatorCount_;
1057
1058 if (allOf_.schemas)
1059 CreateSchemaValidators(context, allOf_);
1060
1061 if (anyOf_.schemas)
1062 CreateSchemaValidators(context, anyOf_);
1063
1064 if (oneOf_.schemas)
1065 CreateSchemaValidators(context, oneOf_);
1066
1067 if (not_)
1068 context.validators[notValidatorIndex_] = context.factory.CreateSchemaValidator(*not_);
1069
1070 if (hasSchemaDependencies_) {
1071 for (SizeType i = 0; i < propertyCount_; i++)
1072 if (properties_[i].dependenciesSchema)
1073 context.validators[properties_[i].dependenciesValidatorIndex] = context.factory.CreateSchemaValidator(*properties_[i].dependenciesSchema);
1074 }
1075 }
1076
1077 return true;
1078 }
1079
1080 void CreateSchemaValidators(Context& context, const SchemaArray& schemas) const {
1081 for (SizeType i = 0; i < schemas.count; i++)

Callers

nothing calls this directly

Calls 3

CreateHasherMethod · 0.80
MallocStateMethod · 0.80
CreateSchemaValidatorMethod · 0.80

Tested by

no test coverage detected