IBM Support

How to add the description as a comment in the Implementation file (.cpp) for a class, instead of adding it to the .h in IBM Rational Rhapsody

Troubleshooting


Problem

In Rational Rhapsody, you can add descriptions for classes and you want to have the descriptions added to the .cpp file as comments.

Cause

By default Rhapsody generates descriptions comments only into the specification file (.h). However, you can add them to the implementation file also.

Resolving The Problem

1. Open the Features dialog at the project level

2. Locate the “CPP_CG::WriterTemplate::ClassImp” property



3. Click the ellipses “…” at the end of the entry.
In the Text Editor, add “[[$description]]” at the beginning of the line. NOTE: the format and ensure that you have the same as below i.e. add a carriage return after the “n” in description


4. Click OK

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.1;8.1.1;8.1.2;8.1.2.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21700742