Just use the Doxygen “structural command” followed by the file’s name, to tell Doxygen that you want this file to be included in the documentation generation process. If there is no file header then Doxygen will not produce documentation for that file. This must be present at the top of every file which needs documentation. Step 2.1: File headersįile headers contain detailed description about a given file. Let us see how you can use Doxygen entities to document your source code at various levels. file name must be present in the file header for inclusion into the documentation generation documentation for page markdown page for the “table of contents” for the markdown page Here another special Doxygen syntax is used which is the syntax.ĭoxygen calls these structural commands.There are several of them and the most useful ones are the following. Next, let’s look at the documentation of parameters. The Doxygen generated documentation from the code above will look like this The entities and tags are implemented in code as shown in the screenshot above. What is an entity in Doxygen? An entity can be a global variable, a structure declaration, enum declaration, or a function. The above 2 syntaxes must be placed just above an entity so that the Doxygen parser can associate the comments to that particular entity. in C we just need 2 slashes for a comment line) These syntaxes are used to tell the Doxygen parser that it is documentation and it needs to be extracted. Note the extra asterisk (*) in line 1 of the first option and extra slash symbol(/), (i.e. The 2 simplest methods to include in C source code are Let us see some of those before we actually get into using them! Doxygen tags and symbols to use in your commentsĭoxygen supports several methods for incorporating documentation inside the comments. We will see how to make use of this file to run Doxygen in the next step! Step 2: Learn How to Document the code using Doxygenĭoxygen works by taking the comments which are specifically formatted according to Doxygen’s pre-agreed syntax.ĭoxygen calls these special syntaxes as “Tags”. This is the file generated when you ran the command “ doxygen -g” in the previous step. Or alternatively, you can open the terminal and cd into the extracted folder containing the make file with contents shown in the below screenshot. Once downloaded extract the contents, navigate into the folder through your file browser, and right-click there and click open in terminal. So scroll a bit down till you see something like it is shown in the screenshot below and click the link shown in the red rectangle that says “.gz” Let us first try method 2 and try and install Doxygen through the executable directly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |