[Uml-devel] C++ Code generator problems ( 1.3.2 and 1.3.92 )

Snyder, Jay A jay.snyder at tycoelectronics.com
Thu Mar 10 06:53:43 UTC 2005


First of all, Umbrello is a very nice tool, thank you!

The following file contains the model and generated code illustrating this
problem:
 http://home.comcast.net/~jay.snyder/UmbrelloTest.tar.bz2


I created the model file with Umbrello 1.3.92 as follows:

1) Create ClassA
2) Create ClassB
3) Create ClassC
4) Add methodA to ClassA
5) Add methodB to ClassB
6) Add methodC to ClassC
7) Generate code
-- at this stage things appear to be OK
8) Add two data members to ClassA (one static).
9) generate code again.

Now, as this stage the classa.h contains two declarations for ClassA, the
old one, and the new one
classb.h contains a contains everything in classa.h + the declaration for
ClassB
classc.h contains a contains everything in classa.h + the declaration for
ClassC

I have seen similar problems with Umbrello 1.3.2 as well.    In that case,
classc.h had everthing from ClassA, and ClassB + ClassC.

Other problems that I've been having with code generation:
If I change formatting options and generate code, the output doesn't change,
old options are still there.
With 1.3.2, someimtes when I make changes to the model the output code still
doesn't change

----------------
Some things that would make code generation more flexible:
Add option to define naming convention for accessors.    Umbrello uses
set_attribute, and get_attribute, but some coding standards (like Qt) use
attribute() for the get method, and setAttribute(data) for the set method.

Either change C++ code generation so that the base filename of the generated
code matches the Class name, including case (like the Java code generation
does), or provide some options, like maybe a dropdown, or radio allowing the
user to select all lower case, or exact case match.





More information about the umbrello-devel mailing list