有时我想在我的 doxygen 评论中提及标准库结构。我可以用 HTML <a>
做到这一点元素 - 但要粘贴的文本很多。我宁愿能够简单地写 {@ref std::string}
,并让 doxygen 知道它需要链接到 cppreference.org page对于 std::string
.
我在想,如果有人要为标准库生成一个 doxygen 标签文件,这也许是可能的(如果标签文件不支持任意 URL,即使这样也可能行不通)。那么,还有其他方法吗?
最佳答案
您应该有一个 Doxygen 标记文件和相应的离线或在线 html 文件。因此,您可以使用以下格式在 Doxygen 配置文件中声明它:
TAGFILES = "/location/of/tagFile=http://onlineUrl Or /location/of/OfflineHtml"
要下载这些文件,我找到了以下两个资源:
偏好设置
我推荐这种方式。因为它有完整的文档。
在线链接
- 下载web tag file .
在配置文件中设置如下:
TAGFILES += "location/of/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/"
离线链接
- 下载html book这是该网站的离线拷贝。
在配置文件中设置如下:
TAGFILES += "location/of/cppreference-doxygen-local.tag.xml=/location/of/html_book_*\reference\en"
GNU 项目
在线链接
- 下载a tag file for the latest version .
在配置文件中设置如下:
TAGFILES = "/location/of/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen"
离线链接
- 下载GCC 7.1 Standard C++ Library Reference Manual in HTML .找到其他版本 here .
在配置文件中设置如下:
TAGFILES = "/location/of/libstdc++.tag = /location/of/libstdc++-api-html"
关于c++ - 我可以让 doxygen 将 @ref 解析为 C++ 标准库函数吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43099899/