c++ - 如何在 doxygen 中显示 C++ 样式包含语法
问题描述
我将 doxygen 评论放在我的文件中。当我生成 HTML 文件(使用 doxygen 应用程序)时,我可以看到
MyClass 类参考
#include <myclass.hpp>
我想像这样显示
MyClass 类参考
#include <MyClass>
我尝试了各种选择,但没有运气。我尝试了 \file MyClass,但仍然显示相同的(上面提到的)行。
这是 doxygen 评论
/**
* \class MyClass
*
* \ingroup demo
*
* \brief Provide an example
*
* This class is meant as an example. It is not useful by itself
* rather its usefulness is only a function of how much it helps
* the reader. It is in a sense defined by the person who reads it
* and otherwise does not exist in any real form.
*
* \file MyClass
*
* Contact: abc@abc.com
*
* Created on: Wed Apr 13 18:39:37 2005
*
*/
解决方案
您还可以按如下方式记录您的课程
/*! \class MyClassName include.h path/include.h * * Docs for MyClassName */
使 doxygen 放
#include <path/include.h>
在 MyClassName 类的文档中,无论包含 MyClassName 定义的实际头文件的名称如何。
所以我会尝试:
/**
* \class MyClass myclass.hpp MyClass
...
*/
推荐阅读
- python - Python numpy 乘法字符串
- reactjs - 过滤列表 React-Admin 中的 OnTextChange 操作如何更改为 OnSubmit
- go - 通过堆栈管理和提供 html/模板数据绑定
- python - 按行查找最大值并相应显示其列名
- swift - Changing properties of objects
- android - API repo 上有 PR 时如何使用 TeamCity 运行 Android 应用程序?
- bash - 如何从 eval 中运行的子 shell 获取错误代码
- web2py - 将 Javascript 模板标签与 Web2Py 模板标签混合使用
- julia - 为什么在给定地图中随机生成位置时要修剪随机比例?
- javascript - 为什么 null >= 0 在javascript中为真