21

I'm sure this has already been asked somewhere but I can't seem to find it, so here it goes.

I am creating a program in C and using Doxygen to generate documentation. I am quite satisfied with the results, however the main page has no content. I would like to fill the main page with a list of all functions and structures used in the program in alphabetical order.

I do not know much about Doxygen, beyond the simple tutorial that I have used to get this far. It seems like a task that Doxygen would be able to do, but so far all I have found is instructions on how to create a custom main page.

Is it possible to use Doxygen to automatically generate a list of functions and structures on the main page?

  • View `index.html`, It will contain `Files` as one of the switchable tabs. Go to Files -> Globals -> Function -> (List of function ordered from a to z) – Gaurav Agarwal Garg Jan 28 '20 at 16:48

3 Answers3

2

Doxygen doesn't really offer a lot from the configuration point of view. You can use, together with Doxygen and doxyrest, a tool called Sphinx.

Basically, you'll be able to generate XML using Doxygen. Doxyrest is going to convert the XML output into .rst files, while Sphinx will work with the final result (it only handles .rst, that's why you'll need to use an intermediate tool like doxyrest).

Sphinx is going to generate beautiful HTML pages that are easy to read and, more important, to configure.

Information on how to combine these three tools and use them together can be found on this page: https://vovkos.github.io/doxyrest/manual/basic.html

A solution to your problem would be to group your functions using the \addtogroup Doxygen command (add all functions to the same group), and then, using Sphinx, select the newly created group page to be your index/landing page. This can be done by editing some lines in Sphinx's conf.py.

Mario Mateaș
  • 638
  • 7
  • 25
0

I was also looking for a more elegant way to see and search all functions. Maybe the following trick will help you that i currently use:

If you use the @todo in your function headers, then you will get in "Related Pages" a "Todo List" with all function names.

There you will get an alphabetical list with all functions with @todo. You are also able to klick on the function name for better navigation.

Example/tip: If you view html output with web browser, you are able to search the todo list for function.

Niko
  • 1
-4

I recommend you to use @mainpage. This function changed the header of the main page and then after it you can use functions like @brief for a short information.

Use html tags to create sections, for me it works. Then in the new section with function @see you can go from the main page to functions or files. This is a working excample:

/**
*       @mainpage WATCHDOG 
*       <hr/>
*       @setion <b> File tree<b/>
*       @brief Here you can see the main files which are used.
*       @see io.c
*       @see watchdog.c
*       @see watchdog.h
*       <p/><br/>
*       <hr/>
*       In this part we have few main functions used by the programm
*       <p/><br/>
*       @see watchdog_init_s();
*       @see fpga_resetregs_init_s();
*       @see watchdog_read(int add, unsigned int ws );
*       @see watchdog_reset_io_write(WD * watchdog, unsigned int* data,unsigned int *ws );
*       <hr/>
*/
Dimitri
  • 108
  • 1
  • 9
  • That isn't really what I asked. I wanted to automatically generate a list of all functions in the program. I've seen other document generators do this. Is it not possible with doxygen? – ZeroKelvinKeyboard Jun 12 '15 at 02:35
  • if that's on main page than i don't know how to do it automaticly. If it doesn't generate the functions at all then you could try using the function @fn or change the Doxyfile configuration. Please give more info, maybe i can help you. – Dimitri Jun 12 '15 at 07:33
  • I'm not sure what additional information you require. I would like it so that I open my documentation there is a clickable list of all the functions from all source files such that I can just click on the function I want to find out about and information will be provided. Sure I can create this manually but it'll be a pain to maintain and probably be incomplete, so I wanted to know if it is possible setup automatically. – ZeroKelvinKeyboard Jun 13 '15 at 13:25