diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-16 15:20:49 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-16 15:20:49 +0100 |
commit | 9929838e62d9c17647d74be54af5853e8b613c4b (patch) | |
tree | 732446f234419a0f1baa5208722e9236affd74bc /src/core/model/Domain.hpp | |
parent | 8cf24170a4998e316c1b9c9bfd2b56e266c544cd (diff) |
validate function for Domain::Descriptor.
Diffstat (limited to 'src/core/model/Domain.hpp')
-rw-r--r-- | src/core/model/Domain.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp index 8bc21e9..ac02ec7 100644 --- a/src/core/model/Domain.hpp +++ b/src/core/model/Domain.hpp @@ -324,6 +324,10 @@ public: */ const NodeVector<StructuredClass> &getChildren() const { return children; } + /* + *TODO: This should check whether another class is permitted that is a + * superclass of this one. + */ /** * Adds a StructuredClass whose instances shall be allowed as children in * the StructureTree of instances of this field. @@ -602,6 +606,17 @@ 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. + * + * @param c is another class that might or might not be a superclass of this + * one + * @return true if this class is a subclass of the given class. + * + */ + bool isSubclassOf(Handle<StructuredClass> c) const; /** * Returns the StructuredClasses that are subclasses of this class. This |