Including requirements as comments in generated code
To facilitate the tracing of requirements to code and vice versa, you can specify that the code generated by IBM® Engineering Systems Design Rhapsody® should include comments that represent the requirements that are met by each code element.
Procedure
To include requirements as comments in the generated code:
Results
Including requirements as comments in implementation files
If you are generating C or C++ code from your model, you can specify that requirements should be generated as comments in the implementation files, next to the operations that realize the requirements. There is also an option to have requirements generated as comments in both the specification and implementation files.
Procedure
To have requirements generated in implementation files:
Results
If you set the value of the Show in field to Implementation, the comment for the requirement is generated in the implementation file, before the relevant operation.
If you set the value of the Show in field to Specification+Implementation, comments are generated in both the specification and implementation files, before the relevant operation.
If you want to customize the text that is generated for the requirement in the implementation file, modify the value of the [lang]_CG::Requirement::DescriptionTemplateForImplementation property.
If you want to customize the text that is generated for the requirement in the specification file, modify the value of the [lang]_CG::Requirement::DescriptionTemplate property.
The values of these two properties can be set for the whole model, for individual packages, or for individual requirements.