Doxygen: Documenting Function Pointer Type Parameters (ANSI-C)

My code needs some types of function pointers, such as

/** * \brief Callback function type "foo" */ typedef int (*foo)(int a, int b); 

I would like to document the semantics of function arguments, but the \param[in,out] next to the \brief operator does not seem to add additional documentation.

Is there a way to get doxygen to add parameter documentation to the type-defs function?

TIA for any help!

+6
source share
1 answer

From your question it is not clear what exactly you tried when placing \ param.

The following works for me (using doxygen 1.8.6):

 /** * \brief Callback function type "foo" * * A longer description of foo. * \param a Description for a * \param b Description for b * \return Description for return value */ typedef int (*foo)(int a, int b); 

As a result, he creates short and long descriptions, a Parameters section with parameters a and b and a Returns section with a description of the return value.

Andy

+2
source

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


All Articles