From f812e01570aedd5033245a76846b5afc0063bc17 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 11 Feb 2015 17:51:50 +0100 Subject: made isSubtree (fieldType) and primitivity orthogonal concepts: PRIMITIVE is no FieldType anymore. --- test/core/model/TestDomain.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test/core/model/TestDomain.hpp') diff --git a/test/core/model/TestDomain.hpp b/test/core/model/TestDomain.hpp index 5ac510c..c107a0d 100644 --- a/test/core/model/TestDomain.hpp +++ b/test/core/model/TestDomain.hpp @@ -42,7 +42,7 @@ static Rooted constructBookDomain(Manager &mgr, mgr, "book", domain, single, {nullptr}, false, true)}; // The structure field of it. - Rooted book_field{new FieldDescriptor(mgr, book)}; + Rooted book_field = book->createFieldDescriptor(logger); // From there on the "section". Rooted section{ @@ -50,7 +50,8 @@ static Rooted constructBookDomain(Manager &mgr, book_field->addChild(section); // And the field of it. - Rooted section_field{new FieldDescriptor(mgr, section)}; + Rooted section_field = + section->createFieldDescriptor(logger); // We also add the "paragraph", which is transparent. Rooted paragraph{new StructuredClass( @@ -59,8 +60,8 @@ static Rooted constructBookDomain(Manager &mgr, book_field->addChild(paragraph); // And the field of it. - Rooted paragraph_field{ - new FieldDescriptor(mgr, paragraph)}; + Rooted paragraph_field = + paragraph->createFieldDescriptor(logger); // We append "subsection" to section. Rooted subsection{ @@ -68,8 +69,8 @@ static Rooted constructBookDomain(Manager &mgr, section_field->addChild(subsection); // And the field of it. - Rooted subsection_field{ - new FieldDescriptor(mgr, subsection)}; + Rooted subsection_field = + subsection->createFieldDescriptor(logger); // and we add the paragraph to subsections fields subsection_field->addChild(paragraph); @@ -80,9 +81,8 @@ static Rooted constructBookDomain(Manager &mgr, paragraph_field->addChild(text); // ... and has a primitive field. - Rooted text_field{new FieldDescriptor( - mgr, text, domain->getTypesystems()[0]->getTypes()[0], - DEFAULT_FIELD_NAME, false)}; + Rooted text_field = + text->createPrimitiveFieldDescriptor(sys->getStringType(), logger); return domain; } -- cgit v1.2.3