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
- In the Palette, click C++ Class and
click an empty space in the class diagram.
- In the New C++ Class wizard, in the Name field,
type the name of the class.
- In the Base class field, complete
one of the following steps:
- If the new class is a sub-class, select the Browse button
to find a base class,
- 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,
- If the new class is not a sub-class of another class,
leave this box empty.
- To specify class characteristics, select the Inline, Virtual
Destructor, or Include Guard check
boxes.
- 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.
- 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.
- Click Finish.
What to do next
Tip: You can also create C/C++ classes by using
action bar or the pop-up menu on the diagram.