internal::Schema: Keep pointer for future use
This commit is contained in:
parent
379b337444
commit
2bfd0cc6c7
@ -349,6 +349,7 @@ public:
|
|||||||
|
|
||||||
Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) :
|
Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) :
|
||||||
allocator_(allocator),
|
allocator_(allocator),
|
||||||
|
pointer_(p),
|
||||||
typeless_(schemaDocument->GetTypeless()),
|
typeless_(schemaDocument->GetTypeless()),
|
||||||
enum_(),
|
enum_(),
|
||||||
enumCount_(),
|
enumCount_(),
|
||||||
@ -596,6 +597,10 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const PointerType& GetPointer() const {
|
||||||
|
return pointer_;
|
||||||
|
}
|
||||||
|
|
||||||
bool BeginValue(Context& context) const {
|
bool BeginValue(Context& context) const {
|
||||||
if (context.inArray) {
|
if (context.inArray) {
|
||||||
if (uniqueItems_)
|
if (uniqueItems_)
|
||||||
@ -1215,6 +1220,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
AllocatorType* allocator_;
|
AllocatorType* allocator_;
|
||||||
|
PointerType pointer_;
|
||||||
const SchemaType* typeless_;
|
const SchemaType* typeless_;
|
||||||
uint64_t* enum_;
|
uint64_t* enum_;
|
||||||
SizeType enumCount_;
|
SizeType enumCount_;
|
||||||
@ -1650,7 +1656,7 @@ public:
|
|||||||
|
|
||||||
//! Gets the JSON pointer pointed to the invalid schema.
|
//! Gets the JSON pointer pointed to the invalid schema.
|
||||||
PointerType GetInvalidSchemaPointer() const {
|
PointerType GetInvalidSchemaPointer() const {
|
||||||
return schemaStack_.Empty() ? PointerType() : schemaDocument_->GetPointer(&CurrentSchema());
|
return schemaStack_.Empty() ? PointerType() : CurrentSchema().GetPointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Gets the keyword of invalid schema.
|
//! Gets the keyword of invalid schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user