Search code examples
htmlc++generatordocumentationdoxygen

How to properly document a C++ function description in doxygen?


I have document with doxygen as follows:

/** @fn
 * Function detailed description
 *
 * @param [in]  param1_name  description of parameter1
 * @param [in]  param2_name  description of parameter2
 * @return return_name return description
 */
uint32_t function_name(uint32_t param1_name, uint32_t param2_name);

But the detailed description isn't being rendered in the doxygen html, I have followed the guidelines from the page without any luck.


Solution

  • You do not need to use the @fn keyword if function documentation is placed just before the documented function. Try this:

    /** @brief function short description 
     *
     * function longer description if need
     * @param[in]  param1_name  description of parameter1
     * @param[in]  param2_name  description of parameter2
     * @return return_name return description
     */
    uint32_t function_name(uint32_t param1_name, uint32_t param2_name);