O ambiente de trabalho K

10.2. Adding Class and Member Documentation

As KDevelop provides all means to add code automatically, it also offers direct documentation. Whenever you're using the Class Generator by choosing "Project"->"New Class", add a descriptive help message to the documentation field. This will add the documentation to the class header.

When adding class member functions and attributes with the classtools , add the member documentation to the according documentation fields as well.

You may think that documentation is a part of the development process that isn't very necessary. But remember that the more your project grows and the more people take part on the development process, class documentation is the best help to save time. If developers have to guess by method names what exactly the method does, it is even more likely that the meaning is misunderstood and the method apparently doesn't do the job a developer guessed it would do. Therefore keep track of your documentation and rebuild it as often as possible.

Besides this, the documentation files are NOT included into the project, nor do they have any internationalization support. Therefore all API documentation should be held in English to allow international development groups to work with your sources.

Whenever you may want to add documentation by hand into the header file, just add the documentation above the method or class in a C-comment style with the difference that the first line has to begin with a slash and a double asterisk.

Example:

   /** enables menuentries/toolbar items
   	*/
   void enableCommand(int id_);