Any software to auto generate doxygen comment blocks?
Ok, so this is an old post, but I just had the same problem and I've found doxymacs. It integrates nicely with emacs and generates doxymacs comments for your functions and files. After putting the .el file in your emacs path you can add a hook to make it available whenever you open a C/C++ file "(add-hook 'c-mode-common-hook'doxymacs-mode)" and comment the functions with C-c d f and the files with C-c d i, there are other comment types available, just check the project page: http://doxymacs.sourceforge.net/
I am quite perplex here.
What is the goal of automatically generating comments ?
Comments are meant to bring additional value:
/**
* \brief: finds the person based on its name
* \param: name, the name of the person
* \result: the person
*/
Person findPerson(Name name);
Is nothing but code clutter that clog my valuable screen estate. And that's about as much as can be generated automatically unfortunately... Notice in particular that I have no idea of what happens if ever the function does not find the person, which certainly seems likely: does it abort ? throws ? (what... ?) returns a default constructed object ?
On the other hand:
///
/// Try an exact match approach to begin with
/// Uses the double metaphone algorithm
/// if none was found as we have
/// a western european clientele
///
Person findPerson(Name name)
{
}
is much more interesting!
- Now I know what is this strange collection of
if
that seems to be performing some kind of sound recognition... - I know its name so I can look it up on Internet to check its implementation (functionality)
- And I know why it was selected and thus when I should reevaluate its use (fits a western european clientele so if we develop on arabic market it'll need adaptation...)
Unfortunately, that's not going to be generated automatically.