diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-08 17:20:56 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-08 17:20:56 +0100 |
commit | 7269e0e232c7971248ffa47aa2ae44786f3d303a (patch) | |
tree | eabdb8a545efd86a3aab3f63deb806e33f08d7a0 /src/core/model/Domain.hpp | |
parent | 33b92b72ed160f22dc627e841d5f84de4ebc0c6c (diff) |
slight changes to Domain and Document. Started to add a more advanced test document creation function as well as the respective domain creation functions. The DemoOutputTest for it looks good so far.
Diffstat (limited to 'src/core/model/Domain.hpp')
-rw-r--r-- | src/core/model/Domain.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp index 6995d14..96e13c7 100644 --- a/src/core/model/Domain.hpp +++ b/src/core/model/Domain.hpp @@ -261,6 +261,11 @@ protected: VisitorSet &visited) override; public: + /** + * Note, that this flag will always be set to "false" for non-primitive + * FieldDescriptors, because in that case the cardinalities regulate + * whether children have to be inserted or not. + */ const bool optional; // TODO: What about the name of default fields? @@ -300,18 +305,15 @@ public: * TREE for the main or default structure or SUBTREE * for supporting structures. * @param name is the name of this field. - * @param optional should be set to 'false' is this field needs to be - * filled in order for an instance of the parent - * Descriptor to be valid. */ FieldDescriptor(Manager &mgr, Handle<Descriptor> parent, FieldType fieldType = FieldType::TREE, - std::string name = "", bool optional = false) + std::string name = "") : Node(mgr, std::move(name), parent), children(this), fieldType(fieldType), // TODO: What would be a wise initialization of the primitiveType? - optional(optional) + optional(false) { } |