Bug 75010 - Wrong C++ code generation with(out) Templates classes
Summary: Wrong C++ code generation with(out) Templates classes
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 1.2
Platform: Mandrake RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-11 22:11 UTC by Eric Jardim
Modified: 2004-12-30 10:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Jardim 2004-02-11 22:11:56 UTC
Version:           1.2 (using KDE 3.1.3)
Installed from:    Mandrake Linux Cooker i586 - Cooker
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
OS:          Linux (i686) release 2.4.22-10mdk

Well,

umbrello 1.2 is much, much, much better than it's last stable version (1.1.1) and I'm feeling more comfortable to design my ideas on it (used only dia before).

I tried to generate some code and the output is a little strange :(

Hey, dont you want help on the code generating module, I could help, and I have some very nice ideas how to deal with the bidirectional model <-> code. Well, lets go to work...

How to Reproduce:
just create a simple class (ex: myclass) and add a template (ex: class T), and try to generate the code in C++.

The result is the myclass.h and myclass.cpp generated, but ignoring the template
--- myclass.h
#include <string> // <- what does it is doing here?

class myclass {
	// lot of comments :)
};

--- myclass.cpp
#include "string" // <- hey, where is "myclass.h"?

// comments again



Expected Behaviour: the expect code to be produce was something like
--- myclass.h
template <class T>
class myclass {
// 
};

well thats other problems, but I think it's a mix of bugs and I think an several inspection on the code generation module would solve most of the problems. Its look to me that the modelling module is priority for the developers. And theyre right. But someday I want to develop my apps with model from umbrello!

[Eric Jardim]
Comment 1 Brian Thomas 2004-02-17 19:55:15 UTC
Yes, the C++ code generation is in its infancy. Templates and Stereotypes
are the "next great leap forward" for this period of development. As I 
dont really understand how to implement the templates part, and expert help
would be very welcome here.

Im changing the severity of this bug to "wishlist" as it basically wants a
feature rather than addressing any particular bug in the code generation.
Comment 2 Jonathan Riddell 2004-02-20 01:28:48 UTC
> dont you want help on the code generating module, I could help, and I have 
> some very nice ideas how to deal with the bidirectional model <-> code

I'm sure our mailing list would be very pleased to hear your ideas.

Comment 3 Oliver Kellogg 2004-12-29 21:49:31 UTC
CVS commit by okellogg: 

BUG:75010 - template parameters setting-to-work


  M +8 -6      ChangeLog   1.53
  M +14 -0     umbrello/dialogs/parmpropdlg.cpp   1.22
  M +6 -0      umbrello/dialogs/umlattributedialog.cpp   1.23
  M +20 -3     umbrello/dialogs/umloperationdialog.cpp   1.38



Comment 4 Oliver Kellogg 2004-12-30 10:40:04 UTC
Note that it is not yet implemented in the new C+ code generator,
so you need to deselect "Use new C++/Java generators" in the
Umbrello general settings.