Topic
  • 2 replies
  • Latest Post - ‏2012-10-30T09:53:35Z by SystemAdmin
SystemAdmin
SystemAdmin
1305 Posts

Pinned topic Move Comments (Descriptionl) into C source files instead of header file

‏2012-10-25T13:00:59Z |
Hi,

I am using Rhapsody 7.5.2.1 for a project in C language. When I generate the sources from Rhapsody, all information in Description fields are converted in C comments but it is done only in Header file (.h). So I need to have these comments for Operations (for example) in C source files too. Is there any properties to set in order to generate comments (with the contents of Description) in C source files please ?

BR

Fabian
Updated on 2012-10-30T09:53:35Z at 2012-10-30T09:53:35Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1305 Posts

    Re: Move Comments (Descriptionl) into C source files instead of header file

    ‏2012-10-28T09:54:45Z  
    Hi Fabian,

    This ability is not available out of the box at the moment.
    You can have comments in the c file by typing them in the source code itself, after invoking Roundtrip these comments are treated as global comments and are preserved in the forward generated code.
    You can also customize the generated code by using the CG SDK mechanism; to have the description printed to the c file as well. if you use Roundtrip, you will need to surround the comment with "ignore" annotation, otherwise Roundrip will take the comment into the model and next code generation the comment will be printed twice - once as global comment and once by your customization.

    Hope it helps
    Amit
  • SystemAdmin
    SystemAdmin
    1305 Posts

    Re: Move Comments (Descriptionl) into C source files instead of header file

    ‏2012-10-30T09:53:35Z  
    Hi Fabian,

    This ability is not available out of the box at the moment.
    You can have comments in the c file by typing them in the source code itself, after invoking Roundtrip these comments are treated as global comments and are preserved in the forward generated code.
    You can also customize the generated code by using the CG SDK mechanism; to have the description printed to the c file as well. if you use Roundtrip, you will need to surround the comment with "ignore" annotation, otherwise Roundrip will take the comment into the model and next code generation the comment will be printed twice - once as global comment and once by your customization.

    Hope it helps
    Amit
    Hi,

    Thanks for your help.

    It could be a nice functionality to have in next release of Rhapsody by default. It could help when we have some C rules or Metrics to respect about the comment lines percent for example.

    Moreover It could be nice to have comment in C when you are doing debugging in target with only generated sources (that is to say without Rhapsody).

    BR