C++ code generation for virtual and pure virtual functions


I am using eclipse-cpp-helios-SR1 release together with SDE-EC 6.1 Professional on Scientific Linux 5.1.

I define a class, say its name is AbstractBase, using a UML class diagram. This class contains a pure virtual function, say its name is virtFunc(). In the class specification, I mark the class as abstract. In the operation specification, I select the function to be ‘Pure Virtual’. Then I generate code, and everything looks fine.

Then I derive a class from AbstractBase in the same UML diagram, say its name is ConcreteSubclass. I use the ‘Realization’ arrow to do so. This class implements the function virtFunc(). Thus, in the operation specification of this function, I select the function to be ‘Virtual’ (not ‘Pure Virtual’ as it is in its base class). The problem is now that when I generate code, the function ConcreteSubclass::virtFunc() is of type ‘pure virtual’ instead of ‘virtual’, no matter what I do. I can therefore not provide an implementation for it.

What am I doing wrong?

Kind regards,
Andreas Isenegger

Dear Andreas Isenegger,

Sorry for our late response and this problem had been fixed. Please run the VP Suite Update to update the software to latest patch (20110110zb or later). Details about update to latest patch can be found at

Feel free to contact me if you require any further information.

Best regards,
Rain Wong

Sorry about hijacking this topic, but it’s close.

I’d also like to define my operations as virtual, but am unable to follow Andreas’ “I select the function to be ‘Pure Virtual’”. There just doesn’t seem to be any option like that in the operation specifications.
Am I just blind or doesn’t my version support this? I’m using Visual Paradigm for UML SE v8.0