From 7269e0e232c7971248ffa47aa2ae44786f3d303a Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Thu, 8 Jan 2015 17:20:56 +0100 Subject: slight changes to Domain and Document. Started to add a more advanced test document creation function as well as the respective domain creation functions. The DemoOutputTest for it looks good so far. --- test/core/model/TestDomain.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/core/model/TestDomain.hpp') diff --git a/test/core/model/TestDomain.hpp b/test/core/model/TestDomain.hpp index 54e79ee..aa3096d 100644 --- a/test/core/model/TestDomain.hpp +++ b/test/core/model/TestDomain.hpp @@ -69,6 +69,18 @@ static Rooted constructBookDomain(Manager &mgr, new FieldDescriptor(mgr, paragraph)}; paragraph->getFieldDescriptors().push_back(paragraph_field); + // We append "subsection" to section. + Rooted subsection{ + new StructuredClass(mgr, "subsection", domain, any)}; + section_field->getChildren().push_back(subsection); + domain->getStructureClasses().push_back(subsection); + // And the field of it. + Rooted subsection_field{ + new FieldDescriptor(mgr, subsection)}; + subsection->getFieldDescriptors().push_back(subsection_field); + // and we add the paragraph to subsections fields + subsection_field->getChildren().push_back(paragraph); + // Finally we add the "text" node, which is transparent as well. Rooted text{new StructuredClass( mgr, "text", domain, any, {nullptr}, {nullptr}, true)}; -- cgit v1.2.3