summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-05 15:05:28 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-05 15:05:28 +0100
commit15dd9d1aa1e0cfe8b31364fb42985ee8d5c5fc9d (patch)
treeb2a2543b442cc4b70e21cea80641bc36aa3b1e36 /src/core
parent4b5f49447e1583756c6f6bb15d7bc643bb7adda3 (diff)
corrected RTTI for domain und document and added a reference to system type system in test domain.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/model/Document.cpp7
-rw-r--r--src/core/model/Domain.cpp6
-rw-r--r--src/core/model/Domain.hpp4
3 files changed, 8 insertions, 9 deletions
diff --git a/src/core/model/Document.cpp b/src/core/model/Document.cpp
index c09532c..b700ba4 100644
--- a/src/core/model/Document.cpp
+++ b/src/core/model/Document.cpp
@@ -191,10 +191,9 @@ Rooted<DocumentPrimitive> DocumentPrimitive::buildEntity(
}
namespace RttiTypes {
-const Rtti<model::Document> Document{"Document",
- std::unordered_set<const RttiBase *>{},
- {&AnnotationEntity, &StructuredEntity}};
-const Rtti<model::DocumentEntity> DocumentEntity{"DocumentEntity"};
+const Rtti<model::Document> Document{
+ "Document", {&Node}, {&AnnotationEntity, &StructuredEntity}};
+const Rtti<model::DocumentEntity> DocumentEntity{"DocumentEntity", {&Node}};
const Rtti<model::AnnotationEntity> AnnotationEntity{
"AnnotationEntity", {&DocumentEntity}, {&StructuredEntity}};
const Rtti<model::StructuredEntity> StructuredEntity{
diff --git a/src/core/model/Domain.cpp b/src/core/model/Domain.cpp
index 41f2b76..f9e2a55 100644
--- a/src/core/model/Domain.cpp
+++ b/src/core/model/Domain.cpp
@@ -82,14 +82,14 @@ void Domain::doResolve(std::vector<Rooted<Managed>> &res,
/* Type registrations */
namespace RttiTypes {
-const Rtti<model::FieldDescriptor> FieldDescriptor{"FieldDescriptor"};
-const Rtti<model::Descriptor> Descriptor{"Descriptor"};
+const Rtti<model::FieldDescriptor> FieldDescriptor{"FieldDescriptor", {&Node}};
+const Rtti<model::Descriptor> Descriptor{"Descriptor", {&Node}};
const Rtti<model::StructuredClass> StructuredClass{
"StructuredClass", {&Descriptor}, {&FieldDescriptor}};
const Rtti<model::AnnotationClass> AnnotationClass{"AnnotationClass",
{&Descriptor}};
const Rtti<model::Domain> Domain{
- "Domain", std::unordered_set<const RttiBase*>{}, {&StructuredClass, &AnnotationClass}};
+ "Domain", {&Node}, {&StructuredClass, &AnnotationClass}};
}
}
diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp
index 7e4e9f7..6995d14 100644
--- a/src/core/model/Domain.hpp
+++ b/src/core/model/Domain.hpp
@@ -559,12 +559,12 @@ protected:
VisitorSet &visited) override;
public:
- Domain(Manager &mgr, std::string name)
+ Domain(Manager &mgr, Handle<SystemTypesystem> sys, std::string name)
// TODO: Can a domain have a parent?
: Node(mgr, std::move(name), nullptr),
structureClasses(this),
annotationClasses(this),
- typesystems(this)
+ typesystems(this, std::vector<Handle<Typesystem>>{sys})
{
}