From 9216a4eb4e2af997444cb7b7c3e4938b91edc4d9 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Sat, 14 Feb 2015 00:09:14 +0100 Subject: added DocumentEntity::getField with direct indexation. --- src/core/model/Document.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/core/model/Document.hpp') diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp index bffd397..5f06eb0 100644 --- a/src/core/model/Document.hpp +++ b/src/core/model/Document.hpp @@ -236,6 +236,18 @@ public: const NodeVector &getField( Handle fieldDescriptor) const; + /** + * This returns the vector of entities containing all members of the field + * with the given index. + * + * If the index is out of bounds an exception is thrown. + * + * @param idx is the index of a field as specified in the + * FieldDescriptor in the Domain description. + * @return a NodeVector of all StructuredEntities in that field. + */ + const NodeVector &getField(const size_t& idx ) const; + /** * This adds a StructureNode to the field with the given index. * -- cgit v1.2.3