Reputation: 67
I have a (finished) project for which i generate Doxygen docu.
The problem is, that the comments are standard c++ comments - no special doxygen comments. They look like this:
// This is a class.
class C
{
// This is a method
public: void f();
};
So is there a way to configure DoxyGen to use all comments? If not, is there a tool around that can parse the code and transform the comments into DoxyGen-Comments?
Upvotes: 0
Views: 166
Reputation: 3062
You can replace the comments by a regex. If you are using the //
only for comments and not within string literals like "Hallo//ABC"
, you can search and replace with the Pattern /\/\/(.*)$/gm
by /** $1 */
. See an example at https://regexr.com/3j7lc
Some Texteditor like Notepad++ support search and replace by Regex.
To search only for lines without some text before the //
you can use /^(\s*)\/\/(.*)$/gm
. Replacement pattern will look like $1/** $2 */
Upvotes: 2