From 9abb2aadf1a0efe3893fcb684ab366e8906ce098 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Thu, 16 Apr 2015 01:07:15 +0200 Subject: Added getFields method to DocumentEntity class to escape akward getDescriptor call to get the number of fields when one wants to iterate over all fields. --- src/core/model/Document.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/model/Document.hpp b/src/core/model/Document.hpp index b2691c0..847796f 100644 --- a/src/core/model/Document.hpp +++ b/src/core/model/Document.hpp @@ -223,6 +223,14 @@ public: */ void setAttributes(const Variant &a); + /** + * Returns a vector of NodeVectors, containing the StructureNode instances + * stored within the fields. + * + * @return a vector containing a NodeVector for each field. + */ + const std::vector> &getFields() const { return fields; } + /** * This returns the vector of entities containing all members of the field * with the given name. -- cgit v1.2.3