我有时想在我的doxygen评论中提到标准库构造。我可以使用HTML <a>
元素执行此操作 - 但需要粘贴大量文本。我宁愿只能写{@ref std::string}
,并且知道它需要链接到std::string
的cppreference.org page。
我想也许如果有人要为标准库生成一个doxygen标签文件,这可能是可能的(如果标签文件不支持任意URL,这甚至可能不起作用)。那么,还有另一种方法吗?
答案 0 :(得分:5)
你应该有一个Doxygen标签文件和相应的离线或在线html文件。因此,您可以使用以下格式在Doxygen配置文件中声明它:
TAGFILES = "/location/of/tagFile=http://onlineUrl Or /location/of/OfflineHtml"
要下载这些文件,我发现以下两个资源:
我推荐这种方式。因为它的完整文档。
在配置文件中设置:
TAGFILES += "location/of/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/"
在配置文件中设置:
TAGFILES += "location/of/cppreference-doxygen-local.tag.xml=/location/of/html_book_*\reference\en"
在配置文件中设置:
TAGFILES = "/location/of/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen"
在配置文件中设置:
TAGFILES = "/location/of/libstdc++.tag = /location/of/libstdc++-api-html"