- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
假设我正在尝试使用 Doxygen 来记录以下类 header 。请注意,该类是纯抽象的,因此我没有相应的源文件。
#ifndef QMFBANK_H
#define QMFBANK_H
#include <memory>
class QMFBank
{
public:
QMFBank();
virtual void setInputReference(std::shared_ptr<double>) = 0;
virtual std::shared_ptr<double> getLowBandReference() = 0;
virtual std::shared_ptr<double> getHighBandReference() = 0;
virtual void clearFilter() = 0;
virtual void update() = 0;
};
#endif // QMFBANK_H
使用 Doxygen,我将以下注释放入头文件中。
#ifndef QMFBANK_H
#define QMFBANK_H
#include <memory>
class QMFBank
{
public:
/**
* @brief Creates a quadrature mirror filter bank
* @param p_in A reference to an input source
*/
QMFBank();
/**
* @brief Sets the reference to the QMF banks input source
* @param p_in A reference to an input source
*/
virtual void setInputReference(std::shared_ptr<double>) = 0;
/**
* @brief Retrieves a reference to the lowpassband output
* @return Returns a shared pointer to the lowpassband output
*/
virtual std::shared_ptr<double> getLowBandReference() = 0;
/**
* @brief Retrieves a reference to the highpassband output
* @return Returns a shared pointer to the highpassband output
*/
virtual std::shared_ptr<double> getHighBandReference() = 0;
/**
* @brief Clears (zeros) the filter bank history
*/
virtual void clearFilter() = 0;
/**
* @brief Updates the filter bank.
* When this method is called, the filter bank will retrieve a new input and update its outputs
*/
virtual void update() = 0;
};
#endif // QMFBANK_H
但是,我认为这看起来很丑陋。是的,文档在 Doxygen HTML 中将非常可读,但在尝试快速引用某些内容时似乎更难阅读。
所以我的问题是:在这种情况下是否有更好的方法来编写 Doxygen 注释?还是这很正常,我应该“处理它”?
最佳答案
您可以使用像///这样的注释来摆脱带有/** 和*/的两行最难看的行,您也可以删除@brief。如果没有这些,它看起来或多或少像 OK 头文件。
#ifndef QMFBANK_H
#define QMFBANK_H
#include <memory>
/// Comment about class itself too
class QMFBank
{
public:
/// Creates a quadrature mirror filter bank
QMFBank();
/// Sets the reference to the QMF banks input source
/// @param p_in A reference to an input source
virtual void setInputReference(std::shared_ptr<double> p_in) = 0;
/// Retrieves a reference to the lowpassband output
/// @return shared pointer to the lowpassband output
virtual std::shared_ptr<double> getLowBandReference() = 0;
/// Retrieves a reference to the highpassband output
/// @return shared pointer to the highpassband output
virtual std::shared_ptr<double> getHighBandReference() = 0;
/// Clears (zeros) the filter bank history
virtual void clearFilter() = 0;
/// Updates the filter bank.
/// When this method is called, the filter bank will retrieve
/// a new input and update its outputs
virtual void update() = 0;
};
#endif // QMFBANK_H
关于c++ - 是否有一种不令人讨厌的方法来 Doxygen 类头文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41334143/
根据docs您总是使用指向一组 HTML 文件的 doxygen 标记文件。那么标记文件本身到底做了什么呢?对于一个生成 700 个 HTML 文件的中等规模的项目,我的标记文件是 500Kb,所以里
哪个 Doxygen 选项可以完全禁用按类型(私有(private)/公共(public)/方法/变量)排序成员,并完全根据声明的顺序输出成员? 最佳答案 这通过配置选项是不可能的。你能做的最好的事情
我在 Windows 上使用 Doxygen 1.7.4。 在生成的文档的文件列表页面中,我想查看相对路径。 我已经设置了FULL_PATH_NAMES = YES , 有更多的东西,而不仅仅是没有路
我已经使用 Doxygen 和 Markdown 为中型 C++ 软件编写了文档。我对它很满意,因为在更改了 xml 层后,我最终得到了这样的结果: http://docs.mitk.org/nigh
我现在正在记录我的项目!就目前情况而言,在“文件列表”下,我看到如下内容: File List Folder1/Sub_Folder1/File01 Folder1/Sub_Folder1/File0
我想将源文件中的行长度限制为 80 个字符。当将 Doxygen 函数链接到具有长原型(prototype)的函数时,这是一个问题,例如因为参数的类型名称很长。 在生成文档时,Doxygen 是否可以
例如我将源代码路径设置为c:\code\testapp\src。那么这是否可以作为我可以使用的 var 来使用 - 例如,这样我就可以在与此相关的位置中吐出一个标记文件,而不是相对于 doxygen
除了PREDEFINED配置选项,我总是可以在其中放置 DOXYGEN=1 , 在读取 C++ 文件之前,doxygen 是否预定义了任何预处理器宏? 我的思路是GCC预定义了__GNUC__等宏,
我正在使用 Doxygen 生成开发人员文档。它正确解析所有文件,但输出在成员函数列表和类图中生成重复条目。 有任何想法吗? 最佳答案 我遇到了这个确切的问题,发现我不小心在 INPUT 中指定了一个
解决了一些后initial problems在尝试让 doxygen 工作时,我在关注 doxygen install tutorial 时偶然发现了下一个错误。 . 到目前为止有效的方法:git c
我想使用 doxygen 创建并链接到中央词汇表。 为了创建词汇表,我会在我的 doxygen 搜索路径中使用“glossary.md”文件。内容可通过“相关页面”获得。 是否可以从我的文档中的任何位
我在生成 Doxygen 文档时遇到了这个问题: Problems running dot: exit code=127, command='dot', arguments='"/home/AAA/s
我正在开发一个使用多个库的项目,其结构如下: /源代码 /libs/libOne /libs/libTwo 我想生成一个包含所有代码和库的 Doxygen 页面。这非常简单,只需将 Doxygen 指
我试图在我的 Doxygen 文件的主页上放几张图片,但没能在网上找到答案,Doxygen 将两张图片放在一起。 有什么办法可以并排吗? 最佳答案 默认情况下,doxygen 将图像放在单独的段落中。
在这个 Doxygen 生成的帮助页面上 http://api.fluffyunderware.com/curvy/index.html ,主页和目录有一个分层文档索引。如何在我自己的文档中复制此功能
由于这似乎是一项很常见的任务,我很难相信如果我想将头文件中的所有 doxygen 注释添加到一个组中,我必须这样做 foo.h /** *\addtogroup fooGroup * @{ *
我刚开始使用 doxygen 1.8.7。我正在尝试将体系结构图添加为使用 doxygen 为我的 C# 项目生成的 API 文档的一部分。我生成了默认的 doxygen 布局文件 (DoxygenL
我正在尝试记录包含在单个 C 头文件中的 C API。当我在文件上运行 doxygen 时,它给了我当前未记录的 C 宏的错误,但是当我为宏添加必要的文档时,虽然清除了未记录的错误,但宏和文档不会出现
如果我有一个类: class Base { public: ///does something virtual void method()=0; }; class Child : publi
我是 Doxygen 的新手,并且能够在模块中创建待办事项。我可以创建一个全局待办事项列表还是有更好的方法将所有待办事项放在一个地方? 最佳答案 所有待办事项(使用 doxygen 命令 \todo
我是一名优秀的程序员,十分优秀!