Creating C/C++ classes

You can create C/C++ classes in the diagram editor.

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

To create a C/C++ class:

  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.
Related tasks
Deleting C/C++ elements from diagrams
Modifying C/C++ classes or data types
Adding fields to C/C++ classes and data types
Adding methods to C/C++ classes and data types
Renaming C/C++ elements
Related reference
Mappings between C/C++ and UML elements
Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.