Page 1 of 1

C++ code génération - class description insertion

PostPosted: Thu 4 Sep 2014 16:16
by valade
I wrote some text in the description field of a class, then I generated C++ code.

I've got the description in both header file (.h) and source file (.cpp) !

Is there a way to tell bouml to only insert description in header file ?
Thanks

Re: C++ code génération - class description insertion

PostPosted: Thu 4 Sep 2014 17:52
by Bruno Pagès
The descriptions are generated through the form ${comment} or ${description} whatever the described element

For a class the description is only generated in the header file because nothing is generated for a class in a source file, so I don't understand you

For an operation yes the description is by default generated in the header and source files, if you don't want to generate the description of an operation in the source file just remove ${comment} or ${description} in its definition

For an artifact yes the description is by default generated in the header and source files, if you don't want to generate the description in the source file just remove ${comment} or ${description} for it

To do that for all the artifact/operations you have to modify the definition in the generation settings (for the element you will create later), to modify the already created element I encourage you to use the "plug-out" named "global change" (please refer to http://www.bouml.fr/doc/index_globalchange.html), I also encourage you to save your project before to do the global change to abort if needed the modifications in case there are not correct (the code generation do not request the project is saved).

Best regards

Re: C++ code génération - class description insertion

PostPosted: Tue 9 Sep 2014 17:30
by valade
Thanks
It work ! after making change in the generation settings do not forget to delete deployment view and generated file then deploy and generate again