diff options
| author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 13:48:45 +0100 |
|---|---|---|
| committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 13:48:45 +0100 |
| commit | 372c67e0844654362fc7d440b0b4a31500a6d02a (patch) | |
| tree | d677aa19bdc77486be02171de77e5675ce5f0f80 /src/core/model/Domain.hpp | |
| parent | db51a874964b038c69f1336a8a659ae40471e26b (diff) | |
| parent | 3e63d6539b9738018a4aca68d07a119e4402e9aa (diff) | |
Merge branch 'master' of somweyr.de:ousia
Conflicts:
application/src/core/model/Domain.hpp
Diffstat (limited to 'src/core/model/Domain.hpp')
| -rw-r--r-- | src/core/model/Domain.hpp | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp index a8d4a9e..d1ba44f 100644 --- a/src/core/model/Domain.hpp +++ b/src/core/model/Domain.hpp @@ -380,22 +380,18 @@ public: * */ class Descriptor : public Node { - -friend FieldDescriptor; + friend FieldDescriptor; private: Owned<StructType> attributesDescriptor; NodeVector<FieldDescriptor> fieldDescriptors; bool continuePath(Handle<StructuredClass> target, - std::vector<Rooted<Node>> &path, - std::set<std::string> ignoredFields = {}, - bool exploreSuperclass = true, - bool exploreSubclasses = true) const; + std::vector<Rooted<Node>> &path) const; protected: void doResolve(ResolutionState &state) override; - + /** * Adds a FieldDescriptor and checks for name uniqueness. */ @@ -553,6 +549,13 @@ private: Owned<StructuredClass> superclass; NodeVector<StructuredClass> subclasses; + /** + * Helper method for getFieldDescriptors. + */ + const void gatherFieldDescriptors( + NodeVector<FieldDescriptor> ¤t, + std::set<std::string> &overriddenFields) const; + public: const bool transparent; // TODO: Is it possible to have root=true and cardinality other than 1? @@ -606,7 +609,7 @@ public: * @return the superclass of this StructuredClass. */ Rooted<StructuredClass> getSuperclass() const { return superclass; } - + /** * Returns true if this class is a subclass of the given class. It does not * return true if the other class is equal to the given class. @@ -635,6 +638,17 @@ public: { return subclasses; } + + /** + * Returns a const reference to the NodeVector of all FieldDescriptors of + * this StructuredClass. This does more than the getter for FieldDescriptor, + * because in this method we gather the FieldDescriptors of all superclasses + * as well that have not been overridden in child classes. + * + * @return a const reference to the NodeVector of all FieldDescriptors of + * this StructuredClass. + */ + NodeVector<FieldDescriptor> getEffectiveFieldDescriptors() const; }; /** @@ -670,9 +684,8 @@ public: * to certain Structures? */ class Domain : public Node { - -friend StructuredClass; -friend AnnotationClass; + friend StructuredClass; + friend AnnotationClass; private: NodeVector<StructuredClass> structuredClasses; |
