Community
Participate
Working Groups
Created attachment 238835 [details] Model reproducing the bug Steps to reproduce: 1. Add class element to model 2. Add 2 operations to class 3. Add the virtual stereotype to the both operations 4. Set both operations to be abstract (making them pure virtual) 5. Set the class to be abstract 6. Generated code for the class A class body cpp file is generated even though it is an abstract class.
I agree that this is not very nice (although its not harmful)
Based on this I think that if: 1. class is abstract, 2. all operations are abstract, 3. none of the operations have bodies, 4. there are no static properties, *and* 5. none of the non-static properties have default values Then the implementation file does not need to be generated. Have I missed any conditions?
The problem with this is that the .cpp file is needed in order to create an implementation for the abstract operation. I recommend that this bug be closed without making any changes. My thinking is that there is no harm in having an empty implementation file (in the rare cases that satisfy the conditions in comment 2) and the cost is considerable complexity is several parts of the generator.