diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-04 22:21:52 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2015-01-04 22:21:52 +0100 |
commit | 0d671f899da720ff5035bdab7adf6b11cbf80cb1 (patch) | |
tree | 9839d502ff323198d0f9cb479e9809a978c5c550 /test/core/model/TestDomain.hpp | |
parent | 7e1c72a5a5d5dc890a49f79c5daec3edcb38a33b (diff) | |
parent | 319ad738f677a20403cc27192f1df7bb65ce8c0e (diff) |
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'test/core/model/TestDomain.hpp')
-rw-r--r-- | test/core/model/TestDomain.hpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/core/model/TestDomain.hpp b/test/core/model/TestDomain.hpp index d55bff7..f457531 100644 --- a/test/core/model/TestDomain.hpp +++ b/test/core/model/TestDomain.hpp @@ -81,11 +81,20 @@ static Rooted<Domain> constructBookDomain(Manager &mgr, Logger &logger) section_field->getChildren().push_back(paragraph); book_field->getChildren().push_back(paragraph); domain->getStructureClasses().push_back(paragraph); + // And the field of it. + Rooted<FieldDescriptor> paragraph_field{new FieldDescriptor(mgr, paragraph)}; + paragraph->getFieldDescriptors().push_back(paragraph_field); + + // Finally we add the "text" node, which is transparent as well. + Rooted<StructuredClass> text{new StructuredClass( + mgr, "text", domain, any, {nullptr}, {nullptr}, true)}; + paragraph_field->getChildren().push_back(text); + domain->getStructureClasses().push_back(text); // ... and has a primitive field. - Rooted<FieldDescriptor> paragraph_field{new FieldDescriptor( - mgr, paragraph, domain->getTypesystems()[0]->getTypes()[1], "text", + Rooted<FieldDescriptor> text_field{new FieldDescriptor( + mgr, text, domain->getTypesystems()[0]->getTypes()[0], "content", false)}; - paragraph->getFieldDescriptors().push_back(paragraph_field); + text->getFieldDescriptors().push_back(text_field); return domain; } |