Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of @see or @link in doxygen

I documented with Javadoc before and used the tags @see, @link or {@see foo} and {link foo} in my description to link to other classes. Now I tried doxygen and it seems that these tags are incompatible. If I run doxygen the complete tags are simply be interpreted as normal text.

Are there any alternative tags which I can use to get the same features?

like image 696
FredFloete Avatar asked Aug 16 '12 16:08

FredFloete


People also ask

How do I add a new line in Doxygen?

Add \n followed by a space at the end of your line [1]. Especially recommended when editing with Emacs, which reacts in weird ways to the other suggested solution <br> . [1] As per @albert's comment. Works for me under Doxygen 1.8.

How do I comment out a code in doxygen C++?

Once specified, you can generate the comment stub by typing the respective “///” or “/**” above a function, or by using the (Ctrl+/) shortcut.

How do I show code in doxygen?

You can put example source code in a special path defined in the doxygen config under EXAMPLE_PATH , and then insert examples with the @example tag. Doxygen will then generate an extra page containing the source of the example. It will also set a link to it from the class documentation containing the example tag.


2 Answers

To link to other classes you should use the ref command. You can use the \link command, but you must end your link text with the \endlink command, which I suspect is your problem (although without example documentation I can't be sure).

From the doxygen manual section on automatic linking, which I suggest you read, there is a paragraph on links to classes:

All words in the documentation that correspond to a documented class and contain at least one non-lower case character will automatically be replaced by a link to the page containing the documentation of the class. If you want to prevent that a word that corresponds to a documented class is replaced by a link you should put a % in front of the word. To link to an all lower case symbol, use \ref.

Some further points to consider:

  • Doxygen does accept the \see (which is synonymous to \sa) and \link commands. If these are not working as expected the OP should include some example documentation you we can try and work out which this is not working as expected.

  • The notation {\command description}, with the enclosing { and } is not common in doxygen documentation, I'm not sure how the program will treat these so it is probably best to not use this style.

like image 71
Chris Avatar answered Oct 14 '22 03:10

Chris


I suspect you are commenting with //

Doxygen will catch the tags this way:

/**
* @KEYWORD DESCRIPTION
*/ 

You can also just add a third / to make each comment line begin with /// as doxygen will catch this also.

like image 1
Chris Dargis Avatar answered Oct 14 '22 01:10

Chris Dargis