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

Technote (troubleshooting)

This document applies only to the following language version(s):



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


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

Document information

More support for: Rational Rhapsody
General Information

Software version: 8.1, 8.1.1, 8.1.2,

Operating system(s): Windows

Reference #: 1700742

Modified date: 31 March 2015