Update BoUml-projects

Please use this forum for open discussions about Bouml.
Merci d'utiliser ce forum pour des discussions ouvertes à propos de Bouml.

Update BoUml-projects

Postby NomisEgnal » Wed 26 Feb 2020 15:00

hi all,

1. I tried to "revers engeneering" the Qwt-project because my project is basing on this. But one Qwt-class (qwt_clipper.h / qwt_clipper.cpp) seems to crash BoUML-reverting tool. I attached these two files.

2. I do not understand the update-functionality of BoUML. If I make changes in the sources (h/cpp) maybe in QtCreator - how do I update the BoUML-project ? Tried this by "revers-file" and "revers dir" but got errors like shown in revers_file.png

Thanks and regards

Simon
Attachments
revers_file.png
Problem-maker h
revers_file.png (21.08 KiB) Viewed 4212 times
qwt_clipper.cpp
Problem-maker cpp
(12.99 KiB) Downloaded 343 times
qwt_clipper.h
Update-Question
(1.08 KiB) Downloaded 333 times
NomisEgnal
 
Posts: 5
Joined: Mon 19 Mar 2018 09:30

Re: Update BoUml-projects

Postby Bruno Pagès » Wed 26 Feb 2020 18:13

Hi,

NomisEgnal wrote:1. I tried to "revers engeneering" the Qwt-project because my project is basing on this. But one Qwt-class (qwt_clipper.h / qwt_clipper.cpp) seems to crash BoUML-reverting tool. I attached these two files.

yes these two files disturb the reverse, I will look at

NomisEgnal wrote:2. I do not understand the update-functionality of BoUML. If I make changes in the sources (h/cpp) maybe in QtCreator - how do I update the BoUML-project ? Tried this by "revers-file" and "revers dir" but got errors like shown in revers_file.png

The reverse must be use the first time to unconditionally add into the model the classes etc from the sources. Later to update the existing model after you modified some sources you must use the roundtrip.

Kind regards
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 659
Joined: Mon 20 Feb 2012 09:23
Location: France

Re: Update BoUml-projects

Postby Bruno Pagès » Thu 27 Feb 2020 19:38

Hi again,

NomisEgnal wrote:.... seems to crash BoUML-reverting tool.


There are two problems.

1) There is a very stupid bug in the management of the formals in the reverse (not the roundtrip) where in an iteration I increment two times an iterator, in case there are an even number of formals the behavior is undefined, if it is odd each formal at an even rank are forget.

2) The reverse is also disturbed because in the cpp file you define classes out of a namespace form prefixing their names by the namespace's name, it does not recognize the constructors when the class is QwtClip::XX but the constructor XX, of course there is no return type for the constructor so finally the result is a syntax error and the constructor is not added in the model. It will the same for destructor. In that case the classes are named with their prefix in the model.

In case the classes are defined into the namespace form in your cpp file the reverse does not produce wrong syntax error and the classes are named without the prefix "QwtClip::". To manage the namespace the reverse create a dedicated package and define the corresponding classes into it (I placed the files into /tmp/re before the reverse and used a project also named re) :
re.png
re.png (117.25 KiB) Viewed 4207 times


The modified files are attached (in the header file I just put QWT_EXPORT in comment), but because of (1) you cannot reverse them
Attachments
qwt_clipper.cpp
(13.08 KiB) Downloaded 308 times
qwt_clipper.h
(1.09 KiB) Downloaded 332 times
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 659
Joined: Mon 20 Feb 2012 09:23
Location: France

Re: Update BoUml-projects

Postby Bruno Pagès » Sun 1 Mar 2020 12:29

Hi,

BoUML 7.9.1 is available correcting the two problems.

However warning, because the cpp file is too convoluted containing classes in a namespace and out of it, the reverse does what it can and the result cannot be the standard way to manage namespaces in BoUML, so the roundtrip will also be disturbed if you apply it on the result

Kind regards
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 659
Joined: Mon 20 Feb 2012 09:23
Location: France


Return to Open discussions / Discussions ouvertes

Who is online

Users browsing this forum: No registered users and 0 guests

cron