Doxygen Tutorials

From Macro Wiki
Revision as of 21:41, 12 August 2017 by Mariana.fonseca (Talk | contribs)

Jump to: navigation, search

This is a simple tutorial with some tips on how to use Doxygen to document codes and how to show the HTML page.

What is Doxygen

Doxygen is a tool to generate documentation from source code. It is primarily used for C++ codes, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL, Fortran, VHDL, Tcl, and to some extent D. You can see more information here.

Download

You can download the Doxygen here.

How to document you code

In order to generate Doxygen documentation, you need to comment the code in a specific way. You can take a look at this page to see more information on how to comment your code.

How to see the HTML page on SourceForge

When you comment your code using the Doxygen style, after compiling, it generates an HTML page.

If you try to see the HTML page in the Source Forge site, it will only show the HTML code: Html.png

However, you may want to see the result of the HTML page, not its code. A way to do that is to look at the Source Forge site using the Anonymous Access. Basically, using the Anonymous Access you have access to a ready-only page, where you can visualize the result of the HTML. You can access the Source Forge project in this way using:

https://svn.code.sf.net/p/PROJECTNAME/REPOSITORY/

If your project has sub-projects, you will need to use:

https://svn.code.sf.net/p/PROJECTNAME/SUBPROJECT/REPOSITORY/

After to be in you repository page, you only need to find the page with de Doxygen documentation and click on the 'index.html' file.

Example:

To better illustrate it, let's use the Little John as an example. We have the project 'macro@ufmg' in Source Forge. Under 'macro@ufmg', we have the sub-project 'Little John', and then the repositories 'AX18 Smart Robotic Arm', 'Mobile Base' and 'Mobile Manipulator'.

Little john.png

So let's choose the repository 'Mobile Manipulator'. The Source Forge page using the Anonymous Access is then

https://svn.code.sf.net/p/macroufmg/littlejohn/mobilebase/

Accessing this page you will see something like this:

Anom page.png

In the case of the repository 'Mobile Manipulator', the file 'index.html' is in the following path:

trunk/ROS/catkin_ws/src/littlejohn_control/src/documentation/html/index.html

So the page with the generated HTML will be

https://svn.code.sf.net/p/macroufmg/littlejohn/mobilemanipulator/trunk/ROS/catkin_ws/src/littlejohn_control/src/documentation/html/index.html