From 9929838e62d9c17647d74be54af5853e8b613c4b Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Fri, 16 Jan 2015 15:20:49 +0100 Subject: validate function for Domain::Descriptor. --- src/core/model/Domain.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/core/model/Domain.hpp') 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 &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 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 c) const; /** * Returns the StructuredClasses that are subclasses of this class. This -- cgit v1.2.3