If you have visual assists, I highly suggest creating a Snippet. You may do this under VA Options:
My Snippet looks like this, and I mapped it to Ctrl + D:
/**
* $SymbolName$
*
* \return $SymbolType$
* \param $MethodArg$
*/
Once you create the snippet you can autogen most of the work for you when documenting a function:
It is important to then fill out the comment with the specific information. The first line will be the short description of the function. Any information after that will be displayed in the long description section. Each variable and return may also be commented, any input or output you do not want to comment, should be deleted from the comment. For example, if the function returns a void, the auto complete will generate the code "* \return void", which should always be deleted. After filling out the comments my function now looks like:
Notice I added an \sa field, which stands for see also. This will allow for a direct link in doxygen to the function that is used to populate the ImageStruct before it is received.
Finally my Doyxgen output for the following function looks like this:
What if the function has multiple args? Was the snippet able to automatically retrieve more than one param from the declaration?
ReplyDelete