Issue #431

Abstract operations are not overridden by operations in derived template specialization classes

Added by Robert Hairgrove 2 months ago. Updated about 1 month ago.

Status:NewStart date:22 August 2020
Priority:MediumDue date:
Assignee:-% Done:


Target version:-


I think the screenshot shows everything. There is a chain of abstract classes which have templates. At the end of the chain is a template class with several specializations. One or more of the abstract methods defined in the base classes are not implemented except in the specialized classes.

However, Modelio gives me an error when I try to do this: “R2340 – A redefined Operation must belong to a parent or an implemented Interface of the owner of the Operation.”

The specialization, or binding class, does not inherit from the template class. But it is perfectly legal in C++ to do this; I don’t know why it causes problems with UML.

modelio_error.png (166 KB) Robert Hairgrove, 22 August 2020 16:29

modelio_error2.png (278 KB) Robert Hairgrove, 23 August 2020 13:34


#1 Updated by Robert Hairgrove 2 months ago

Or do I even have to declare the functions in the specialized classes again? After all, they are declared in the class being specialized.

#2 Updated by Robert Hairgrove about 1 month ago

Actually, this description was not completely like the problem I am having. The new screenshot illustrates this much better.

In a nutshell, the template specializations remain abstract because op1() and op2() are only implemented in the classes which derive from the specializations. This must be a rather common idiom in C++.

I was able to work around the problem by creating additional generalization links between the template specialization classes and the template classes they specialize, then hide them in the diagram. At least it makes the errors go away. Since I am not interested here so much in code generation, I can live with it (the code exists already; I am trying to construct a UML model for documentation purposes).

Also available in: Atom PDF