summaryrefslogtreecommitdiff
path: root/test/core/model/TestDomain.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-11 17:51:50 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-11 17:51:50 +0100
commitf812e01570aedd5033245a76846b5afc0063bc17 (patch)
tree012cbf8bc2dc482be094d789dd433ec4523c120b /test/core/model/TestDomain.hpp
parent5659292bf1a317235a51a946df640376f325b124 (diff)
made isSubtree (fieldType) and primitivity orthogonal concepts: PRIMITIVE is no FieldType anymore.
Diffstat (limited to 'test/core/model/TestDomain.hpp')
-rw-r--r--test/core/model/TestDomain.hpp18
1 files changed, 9 insertions, 9 deletions
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<Domain> constructBookDomain(Manager &mgr,
mgr, "book", domain, single, {nullptr}, false, true)};
// The structure field of it.
- Rooted<FieldDescriptor> book_field{new FieldDescriptor(mgr, book)};
+ Rooted<FieldDescriptor> book_field = book->createFieldDescriptor(logger);
// From there on the "section".
Rooted<StructuredClass> section{
@@ -50,7 +50,8 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
book_field->addChild(section);
// And the field of it.
- Rooted<FieldDescriptor> section_field{new FieldDescriptor(mgr, section)};
+ Rooted<FieldDescriptor> section_field =
+ section->createFieldDescriptor(logger);
// We also add the "paragraph", which is transparent.
Rooted<StructuredClass> paragraph{new StructuredClass(
@@ -59,8 +60,8 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
book_field->addChild(paragraph);
// And the field of it.
- Rooted<FieldDescriptor> paragraph_field{
- new FieldDescriptor(mgr, paragraph)};
+ Rooted<FieldDescriptor> paragraph_field =
+ paragraph->createFieldDescriptor(logger);
// We append "subsection" to section.
Rooted<StructuredClass> subsection{
@@ -68,8 +69,8 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
section_field->addChild(subsection);
// And the field of it.
- Rooted<FieldDescriptor> subsection_field{
- new FieldDescriptor(mgr, subsection)};
+ Rooted<FieldDescriptor> subsection_field =
+ subsection->createFieldDescriptor(logger);
// and we add the paragraph to subsections fields
subsection_field->addChild(paragraph);
@@ -80,9 +81,8 @@ static Rooted<Domain> constructBookDomain(Manager &mgr,
paragraph_field->addChild(text);
// ... and has a primitive field.
- Rooted<FieldDescriptor> text_field{new FieldDescriptor(
- mgr, text, domain->getTypesystems()[0]->getTypes()[0],
- DEFAULT_FIELD_NAME, false)};
+ Rooted<FieldDescriptor> text_field =
+ text->createPrimitiveFieldDescriptor(sys->getStringType(), logger);
return domain;
}