Creating C/C++ classes in domain modeling class diagrams

You can use domain modeling class diagrams to create C/C++ classes.

Before you begin

You must be in the C/C++ perspective.

About this task

To create a C/C++ class, complete the following steps:

Procedure

  1. In the Palette, click C++ Class and click an empty space in the class diagram.
  2. In the New C++ Class wizard, in the Name field, type the name of the class.
  3. In the Base class field, complete one of the following steps:
    1. If the new class is a sub-class, select the Browse button to find a base class,
    2. If the class is a sub-class and the base class name has been entered, select one of the Access buttons for its inherited access to the base class,
    3. If the new class is not a sub-class of another class, leave this box empty.
  4. To specify class characteristics, select the Inline, Virtual Destructor, or Include Guard check boxes.
  5. Beside the Header File field, select the Link to file check box and type the name or browse for a header file for the source definition of the class.
  6. Beside the Body File field, select the Link to file check box and type the name or browse for a body file for the method source code of the new class.
  7. Click Finish.

What to do next

Tip: You can also create C/C++ classes by using action bar or the Add C/C++ > Class pop-up menu on the diagram.

Feedback