Page 1 of 1

comments in the source of a class in C++

PostPosted: Wed 17 May 2017 14:50
by hboehmer
Hello,

there is a question about inserting a comment block in the source of a class in C++.

I have attached a screendump with a testproject containing only one class c1. You see the 'Class dialog' with a description 'base_class'. You see also the generated source and header for the class c1. The description is inserted as a comment in the c1.h but not in c1.cpp. Where can I input a comment for c1.cpp?

Best regards,
Heiko

Re: comments in the source of a class in C++

PostPosted: Wed 17 May 2017 17:31
by Bruno Pag├Ęs
Hello,

A class is generated in the header file, not in the source file, so it is normal to have its description also produced in the header file rather than the source file, and by default it is before the class definition

In the case of an operation it is different, an operation is declared in the class and defined out of it, when an operation has a description that one is produced by default both before its declaration and before its definition being produced in the source file except some cases.

Let's note you can put comment in the artifact definition for the header and/or the source part, so you are able to generate comments for instance in the source file at any places you want before/between/after one or several of the keyword ${xxx}

Best regards,
Bruno

Re: comments in the source of a class in C++

PostPosted: Thu 18 May 2017 06:04
by hboehmer
Hello Bruno,

thank you for your very fast explainations. Now I understand Bouml a little bit better.

Best regards,
Heiko