Page 1 of 1

Update BoUml-projects

PostPosted: Wed 26 Feb 2020 15:00
by NomisEgnal
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

Re: Update BoUml-projects

PostPosted: Wed 26 Feb 2020 18:13
by Bruno Pagès
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

Re: Update BoUml-projects

PostPosted: Thu 27 Feb 2020 19:38
by Bruno Pagès
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 4103 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

Re: Update BoUml-projects

PostPosted: Sun 1 Mar 2020 12:29
by Bruno Pagès
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