diff options
Diffstat (limited to 'src/core/model/Document.hpp')
-rw-r--r-- | src/core/model/Document.hpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp index 5f06eb0..e314304 100644 --- a/src/core/model/Document.hpp +++ b/src/core/model/Document.hpp @@ -754,6 +754,7 @@ private: Owned<StructuredEntity> root; NodeVector<AnnotationEntity> annotations; NodeVector<Domain> domains; + NodeVector<Typesystem> typesystems; protected: void doResolve(ResolutionState &state) override; @@ -771,7 +772,8 @@ public: Document(Manager &mgr, std::string name) : RootNode(mgr, std::move(name), nullptr), annotations(this), - domains(this) + domains(this), + typesystems(this) { } @@ -891,6 +893,25 @@ public: } /** + * Adds a Typesystem reference to this Document. + */ + void referenceTypesystem(Handle<Typesystem> d) + { + invalidate(); + typesystems.push_back(d); + } + + /** + * Adds multiple Typesystem references to this Document. + */ + void referenceTypesystems(const std::vector<Handle<Typesystem>> &d) + { + invalidate(); + typesystems.insert(typesystems.end(), d.begin(), d.end()); + } + + + /** * Returns true if and only if the given StructureNode is part of this * document, meaning that there is a path of parent references in the * Structure Tree leading from the given StructureNode to this Document. |