[ACCEPTED]-Doxygen: Documenting overloaded functions-doxygen
Accepted answer
There is an \overload doxygen command for 3 such cases. See the doxygen command reference. Use your regular \fn command 2 for the base case and use \overload for 1 any, well, overload. :)
You can simply document each overload as 8 if it is a separate method (which it is, really 7 :-) - just put the entire method signature 6 in the \fn command instead of just the method's 5 name. As in:
/**
\fn func()
\details Description here.
*/
void func() { }
/**
\fn func(int i)
\details Description here.
*/
void func(int i) { }
(Sorry, I just had to move the 4 doc comments above the methods where they 3 belong :-)
And indeed, you don't need the 2 \fn command at all, if the comment is directly 1 ahead of the code element it pertains to.
/**
\details Description here.
*/
void func() { }
/**
\details Description here.
*/
void func(int i) { }
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.