[Uml-devel] CPP code generation patch

Daniel Herring electronics33 at sbcglobal.net
Fri Feb 11 05:13:56 UTC 2011


So after using Umbrello for the last few years for UML modeling I decided that 
some changes were needed in the code generation aspect of it.
So what I have worked through are the following, but I do not have a webserver 
to upload the 60k patch to any help with that would be great.

Daniel Herring

Reduced CPP .h files to generate a single public, protected, and private 
sections, which was violated by the write protected attributes as public. 

Encapsulates the ENUMs in package .h file if the enums are in a package.
Write a package .h file that includes all the class .h files that belong to that 
package.
Properly capitalize file names to work with case sensitive file systems (Linux)
The Abstract class banner does not print out if a class is a child class of an 
abstract class.
Classes will only inherit a base type once, also will only include the header 
file once.

Fixed some random inconsistencies in file names, comments, variable naming...
Created a copy constructor and copy routine to go with the empty constructors.
Separated accessors function documentation from the variable documentation.
Add proper doxygen tags for \fn \brief and \var, made sure there was a new line 
before the body.
Added m_ to all class variable declarations
If a class or enum is in multiple namespaces all namespace bracketing is put in 
instead of just the single parent package.


An option to use a class private mutex to protect access to the attributes.
An option to use QT 4.5 specific data types and logic.

Some issues I am still experiancing and would like some help with:
    How do I get the setting of the 2 added options saved so they load each 
time?

A concern or two
    I had to rewrite some of the model_utils.c findUmlObject and I am not sure 
how that change effects other things. I simplified it to use a breath first tree 
search.
    Also in  void UMLPackage::appendClassesAndInterfaces() I had to add enums to 
the object types that get passed to code generation for the code generation 
wizard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20110210/2351331a/attachment.html>


More information about the umbrello-devel mailing list