| 762 | } |
| 763 | |
| 764 | bool StartObject(Context& context) const { |
| 765 | if (!(type_ & (1 << kObjectSchemaType))) |
| 766 | RAPIDJSON_INVALID_KEYWORD_RETURN(GetTypeString()); |
| 767 | |
| 768 | if (hasDependencies_ || hasRequired_) { |
| 769 | context.propertyExist = static_cast<bool*>(context.factory.MallocState(sizeof(bool) * propertyCount_)); |
| 770 | std::memset(context.propertyExist, 0, sizeof(bool) * propertyCount_); |
| 771 | } |
| 772 | |
| 773 | if (patternProperties_) { // pre-allocate schema array |
| 774 | SizeType count = patternPropertyCount_ + 1; // extra for valuePatternValidatorType |
| 775 | context.patternPropertiesSchemas = static_cast<const SchemaType**>(context.factory.MallocState(sizeof(const SchemaType*) * count)); |
| 776 | context.patternPropertiesSchemaCount = 0; |
| 777 | std::memset(context.patternPropertiesSchemas, 0, sizeof(SchemaType*) * count); |
| 778 | } |
| 779 | |
| 780 | return CreateParallelValidator(context); |
| 781 | } |
| 782 | |
| 783 | bool Key(Context& context, const Ch* str, SizeType len, bool) const { |
| 784 | if (patternProperties_) { |
nothing calls this directly
no test coverage detected