| 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++) |
nothing calls this directly
no test coverage detected