summaryrefslogtreecommitdiff
path: root/src/core/model/Document.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/model/Document.hpp')
-rw-r--r--src/core/model/Document.hpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp
index c70a6a3..b73e07d 100644
--- a/src/core/model/Document.hpp
+++ b/src/core/model/Document.hpp
@@ -108,6 +108,8 @@
#ifndef _OUSIA_MODEL_DOCUMENT_HPP_
#define _OUSIA_MODEL_DOCUMENT_HPP_
+#include <set>
+
#include <core/managed/ManagedContainer.hpp>
#include <core/common/Variant.hpp>
@@ -159,6 +161,8 @@ protected:
fields[getFieldDescriptorIndex(fieldName, true)].push_back(s);
}
+ bool doValidate(Logger &logger, std::set<ManagedUid> &visited) const;
+
public:
/**
* The constructor for a DocumentEntity. Node that this does not inherit
@@ -256,8 +260,6 @@ public:
return fields[getFieldDescriptorIndex(fieldDescriptor, true)];
}
- bool validate(Logger& logger) const;
-
// TODO: Change this to move methods.
// /**
// * This adds a StructureNode to the field with the given name. If an
@@ -343,6 +345,8 @@ public:
* common superclass for StructuredEntity, Anchor and DocumentPrimitive.
*/
class StructureNode : public Node {
+ friend DocumentEntity;
+
public:
/**
* Constructor for a StructureNode at the root.
@@ -364,6 +368,10 @@ public:
* information please refer to the header documentation above.
*/
class StructuredEntity : public StructureNode, public DocumentEntity {
+protected:
+ bool doValidate(Logger &logger,
+ std::set<ManagedUid> &visited) const override;
+
public:
/**
* Constructor for a StructuredEntity in the Structure Tree.
@@ -505,6 +513,9 @@ class AnnotationEntity : public Node, public DocumentEntity {
private:
Owned<Anchor> start;
Owned<Anchor> end;
+protected:
+ bool doValidate(Logger &logger,
+ std::set<ManagedUid> &visited) const override;
public:
/**