Adding methods to C/C++ classes and data types

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:
  1. In the diagram editor, right-click a C/C++ class or interface; then click Add C/C++ > Method.
  2. In the Create C/C++ Method wizard, in the Return Type field, specify a return type from the list.
  3. In the Name field, type a name for the new method.
  4. In the Parameter List field, type in the parameters for the method.
  5. In the Access Visibility field, specify an access level for the method.
  6. If the method is to be static, select the static check box.
  7. If the method is to be a virtual operation, select the virtual check box.
  8. If the method is not to be modified, select the const check box.
  9. If the method is to be inline, select the inline check box.
  10. If the method is to be a pure virtual operation for abstract base classes, select the pure check box.
  11. If the method is to be viewed by other elements, select the friend check box.
  12. Click Finish.
Note: You can also use the action bar to add methods to C/C++ classes and data types.

Parent topic: Developing C/C++ elements

Related concepts
Attributes
Operations

Related tasks
Modifying C/C++ classes or data types
Adding fields to C/C++ classes and data types
Renaming C/C++ elements

Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.