我可以让doxygen解析@ ref到C ++标准库函数吗?

时间:2017-03-29 17:09:14

标签: c++ doxygen code-documentation

我有时想在我的doxygen评论中提到标准库构造。我可以使用HTML <a>元素执行此操作 - 但需要粘贴大量文本。我宁愿只能写{@ref std::string},并且知道它需要链接到std::string的cppreference.org page

我想也许如果有人要为标准库生成一个doxygen标签文件,这可能是可能的(如果标签文件不支持任意URL,这甚至可能不起作用)。那么,还有另一种方法吗?

1 个答案:

答案 0 :(得分:5)

你应该有一个Doxygen标签文件和相应的离线或在线html文件。因此,您可以使用以下格式在Doxygen配置文件中声明它:

TAGFILES = "/location/of/tagFile=http://onlineUrl Or /location/of/OfflineHtml"

要下载这些文件,我发现以下两个资源:

Cppreference

我推荐这种方式。因为它的完整文档。

在线链接

  1. 下载web tag file
  2. 在配置文件中设置:

    TAGFILES += "location/of/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/"
    
  3. 离线链接

    1. 下载该网站的离线副本html book
    2. 在配置文件中设置:

      TAGFILES += "location/of/cppreference-doxygen-local.tag.xml=/location/of/html_book_*\reference\en"
      
    3. More

      GNU项目

      在线链接

      1. 下载a tag file for the latest version
      2. 在配置文件中设置:

        TAGFILES = "/location/of/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen"
        
      3. 离线链接

        1. 下载GCC 7.1 Standard C++ Library Reference Manual in HTML。其他版本here
        2. 在配置文件中设置:

          TAGFILES = "/location/of/libstdc++.tag = /location/of/libstdc++-api-html"
          
        3. More