How to compare two concept variables
Hey,
Is there any way to compare to variables of type concept<>? I want to find out if one is a subconcept of the other one. As far as I see the isSubConceptOf method only allows concept declarations as parameter and no variables of type concept<>.
Many thanks
Fabian
Is there any way to compare to variables of type concept<>? I want to find out if one is a subconcept of the other one. As far as I see the isSubConceptOf method only allows concept declarations as parameter and no variables of type concept<>.
Many thanks
Fabian
Please sign in to leave a comment.
I want to reuse several baselanguage expressions in my language. So I try to write a util method for can be ancestor constraints that checks if an expression is supported.
It would be nice to specify two arrays/collections, one with included expressions and one with excluded. So I can use all BinaryOperations but not the NPEEqualsExpression.
Of course I can use a statement like expression.isInstantOf(BinaryOperation) &&!(expression.isInstantOf(NPEEqualsExpression)). But since there are several expressions this statement will get long. A loop will be much nicer. Perhaps there is a total different way to deal with this issue.
concept<> c = concept/IntegerConstant/; concept<> c2 = concept/IntegerLiteral/; if (SConceptOperations.isSubConceptOf(c, c2.getFqName())) { //... }