Summary: | c++ codegenerator creates uncompilable code using compositions | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Ralf Habacker <ralf.habacker> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | nitinjavakid |
Priority: | NOR | ||
Version: | 2.21.2 (KDE Applications 16.12.2) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
xmi test case
Simplified Test Case |
Description
Ralf Habacker
2017-03-14 14:32:21 UTC
Created attachment 104565 [details]
xmi test case
Yes associations are broken. Am currently investigating what broke it in code. Created attachment 104820 [details]
Simplified Test Case
Lesser classes
In CppWriter::writeHeaderAccessorMethodDecl() there is a call to writeAssociationMethods(c->getCompositions(), permitScope, true, INLINE_ASSOCIATION_METHODS, false, c->id(), stream) which deals with compositions. This method generates the File composition in the class Folder *AND* the Folder pointer in the File class. For generating the composition the parameter writePointerVar is set to false to avoid generating classname followed by '*' in the accessor parameter list. Unfortunally writePointerVar = true is required to generate the classname followed by '*' in the accessor methods to m_folder in the File class. So with current code either class Folder is uncompilable or class File is uncompilable. |