summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-04-16 01:07:15 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:26:12 +0200
commit9abb2aadf1a0efe3893fcb684ab366e8906ce098 (patch)
treea0b85d8d2c0e52324195c878bbfcdbb5cf0c9d11 /src/core
parent5bfde97c13821a6eecf0828c39c5f0f35552776e (diff)
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.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/model/Document.hpp8
1 files changed, 8 insertions, 0 deletions
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
@@ -224,6 +224,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<NodeVector<StructureNode>> &getFields() const { return fields; }
+
+ /**
* This returns the vector of entities containing all members of the field
* with the given name.
*