You can add a method to a C/C++ class or data type.
You must be in the C/C++ perspective and have a diagram open in the
diagram editor.
To add a method to a C/C++ class or data type:
- In the diagram editor, right-click a C/C++ class or interface;
then click .
- In the Create C/C++ Method wizard, in the Return
Type field, specify a return type from the list.
- In the Name field, type a name for the new
method.
- In the Parameter List field, type the parameters
for the method.
- In the Access Visibility field, specify
an access level for the method.
- If the method is static, select the static check
box.
- If the method is a virtual operation, select the virtual check
box.
- If the method cannot be modified, select the const check
box.
- If the method is inline, select the inline check
box.
- If the method is a pure virtual operation for abstract base classes,
select the pure check box.
- If the method can be viewed by other elements, select the friend check
box.
- Click Finish.
If applicable, the include directives for the method signature
types are added to the include file automatically.
Tip: You
can also use the action bar to add methods to C/C++ classes and data types.