From 60d9d3f9f54fab975c39d4c341f118df90628375 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Mon, 12 Jan 2015 13:42:10 +0100 Subject: normalized NodeVector access in model classes and added some more documentation to model classes. --- test/core/model/TestDocumentBuilder.hpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'test/core/model/TestDocumentBuilder.hpp') diff --git a/test/core/model/TestDocumentBuilder.hpp b/test/core/model/TestDocumentBuilder.hpp index ed7a0ee..4662a28 100644 --- a/test/core/model/TestDocumentBuilder.hpp +++ b/test/core/model/TestDocumentBuilder.hpp @@ -165,8 +165,7 @@ Rooted buildStructuredEntity( fieldName + "!"); return {nullptr}; } - NodeVector &field = parent->getField(fieldName); - field.push_back(entity); + parent->addStructuredEntity(entity, fieldName); // and return it. return entity; @@ -205,8 +204,7 @@ Rooted buildPrimitiveEntity( fieldName + "!"); return {nullptr}; } - NodeVector &field = parent->getField(fieldName); - field.push_back(entity); + parent->addStructuredEntity(entity, fieldName); // and return it. return entity; } @@ -244,8 +242,7 @@ Rooted buildAnchor(Logger &logger, fieldName + "!"); return {nullptr}; } - NodeVector &field = parent->getField(fieldName); - field.push_back(anchor); + parent->addStructuredEntity(anchor, fieldName); // and return it. return anchor; } @@ -289,9 +286,9 @@ Rooted buildAnnotationEntity( // Then construct the AnnotationEntity itself Rooted anno{new AnnotationEntity( document->getManager(), document, descriptor.cast(), - attributes, start, end, name)}; + start, end, attributes, name)}; // append the new entity to the document - document->getAnnotations().push_back(anno); + document->addAnnotation(anno); // and return it. return anno; } -- cgit v1.2.3