Use of @see or @link in doxygen

北慕城南 提交于 2019-12-07 05:26:54

问题


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?


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/11991616/use-of-see-or-link-in-doxygen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!