Preliminary oxygen evolution parameter

I have a doxygen header for a function as follows:

/** Some description. @param[in] grid1 First grid @param[in] grid2 Second grid @pre grid1 and grid2 must be of the same dimensions */ 

I would like grid1 and grid2 be specifically highlighted in the prerequisites section of the generated documentation, as they are parameters. In my opinion, I should be able to do something like

 @pre #grid1 and #grid2 must be the same size 

But that does not work.

Any thoughts on how to achieve this?

+6
source share
2 answers

It would be nice if # automatically bound to the definition of the function argument. However, I don’t see how to do this in the automatic link generation section of the doxygen manual.

Looking at the source of the HTML documentation, it seems that the parameters look just like strong and with the paramname class. So something like

 @pre <strong class="paramname">grid1</strong> and <strong class="paramname">grid2</strong> must be the same size. 

should provide you with the desired results. Clearly, it is overly verbose to write out every time. However, you must define a custom command , such as \paramname , so that you can simply write

 @pre \paramname{grid1} and \paramname{grid2} must be the same size. 

Change This can be achieved using the configuration file alias.

 ALIASES += paramname{1}="<strong class="paramname">\1</strong>" 
+6
source

He landed here in search of an answer, but found it elsewhere.

Use \p to indicate that the next word is a parameter of the function.

And of course, you can use @ instead of \ .

 /** Some description. @param[in] grid1 First grid @param[in] grid2 Second grid @pre @p grid1 and @p grid2 must be of the same dimensions */ 

See the Doxygen Special Command Reference .

0
source

Source: https://habr.com/ru/post/918392/


All Articles