FredFloete
FredFloete

Reputation: 659

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?

Upvotes: 7

Views: 20027

Answers (3)

Chris
Chris

Reputation: 46346

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.

Upvotes: 5

Chris Dargis
Chris Dargis

Reputation: 6053

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.

Upvotes: 1

Lyubomir Vasilev
Lyubomir Vasilev

Reputation: 3030

I stumbled upon a nice article that makes a comparison of javadoc and doxygen, showing some example equivalent codes (@link, etc.). You can see it here. I hope it helps.

Upvotes: 0

Related Questions