From 9249dbedc1a778cf02203a1bcb14880c9bdb0b4e Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 4 Feb 2015 22:40:40 +0100 Subject: allowed actual field descriptor references. --- src/core/model/Domain.hpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'src/core/model/Domain.hpp') diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp index bef7919..dd0af4c 100644 --- a/src/core/model/Domain.hpp +++ b/src/core/model/Domain.hpp @@ -507,6 +507,27 @@ public: return fieldDescriptors; } + /** + * Adds the given FieldDescriptor to this Descriptor. This also sets the + * parent of the given FieldDescriptor if it is not set yet. + * + * @param fd is a FieldDescriptor. + */ + void addFieldDescriptor(Handle fd); + + /** + * Adds the given FieldDescriptors to this Descriptor. This also sets the + * parent of each given FieldDescriptor if it is not set yet. + * + * @param fds are FieldDescriptors. + */ + void addFieldDescriptors(const std::vector> &fds) + { + for (Handle fd : fds) { + addFieldDescriptor(fd); + } + } + /** * Adds the given FieldDescriptor to this Descriptor. This also sets the * parent of the given FieldDescriptor if it is not set to this Descriptor @@ -514,7 +535,7 @@ public: * * @param fd is a FieldDescriptor. */ - void addFieldDescriptor(Handle fd); + void moveFieldDescriptor(Handle fd); /** * Adds the given FieldDescriptors to this Descriptor. This also sets the @@ -523,10 +544,10 @@ public: * * @param fds are FieldDescriptors. */ - void addFieldDescriptors(const std::vector> &fds) + void moveFieldDescriptors(const std::vector> &fds) { for (Handle fd : fds) { - addFieldDescriptor(fd); + moveFieldDescriptor(fd); } } -- cgit v1.2.3