cdoxygenlong-parameter-list

Handling long links in doxygen


Given a function declaration with a long parameter list such as:

uint8 rtSetTime(RTIME *rtime, uint8 day, uint8 month, uint16 year,
    uint8 hour, uint8 minute, uint8 second);

is there a way to split the parameter list across multiple lines such that doxygen will still parse the @link command correctly? At present I can only get it to work if the function declaration is on a single line, ie:

@link rtSetTime(RTIME *rtime, uint8 day, uint8 month, uint16 year, uint8 hour, uint8 minute, uint8 second) rtSetTime @endlink

Solution

  • You should never use the parameter names in the link. Assuming rtSetTime is not an overloaded function it is not really needed to specify all parameter types either.

    Here are a number of ways to link to the function, from shortest to longest. The last two also work in case the function is overloaded.

    /** @mainpage 
     *  - #rtSetTime 
     *  - @ref rtSetTime "rtSetTime"
     *  - @ref rtSetTime() "rtSetTime"
     *  - @link rtSetTime rtSetTime@endlink 
     *  - @link rtSetTime() rtSetTime@endlink
     *  - @ref rtSetTime(RTIME*,uint8,uint8,uint16,uint8,uint8,uint8) "rtSetTime"
     *  - @link rtSetTime(RTIME*,uint8,uint8,uint16,uint8,uint8,uint8) rtSetTime @endlink
     */