El manual de usuario de KDevelop: Guía de referencia para el Entorno Integrado de Desarrollo KDevelop para sistemas Unix, versión 1.2. | ||
---|---|---|
Prev | Chapter 10. El navegador de clases | Next |
The Class Browser additionally allows adding methods and attributes directly by dialogs. This means you don't have to type the classdeclaration and the implementation header yourself. After adding a method, you only have to set the formal parameters to the implementation header and, if the method requires an attribute, to the declaration .
How to add a method to a class
select the class you want to add a method
press the right mouse button; the popup menu appears
select "Add member function".
the "Add member function" dialog appears.
insert the type, declaration and documentation for the method
specify the access and the modifiers for the method
press OK to exit the dialog
For adding a variable , this is the same action, just with selecting "Add member variable " in the popup menu.
The difference between the actions of these dialogs is that the adding of a variable will add the variable to the classdeclaration , the adding of a method will add the method's declaration and the method's implementation header to the sources. As the classviewer directly updates himself, you have a direct access to the new method implementation , so you only have to fill out the code for the actual purpose of the method.