是否有一种无偶然的方法来吸收类标头文件
Is there a non-obnoxious way to Doxygen a class header file?
假设我正在尝试使用doxygen来记录以下类标题。请注意,此类纯粹是抽象的,因此我没有相应的源文件。
#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
相关文章:
- 如何使用curlpp通过POST方法上传文件和json数据
- 一种在C++中读取TXT配置文件的简单方法
- 在 cpp 文件中隐藏采用模板参数引用的方法
- 在C++中包含原型文件的正确方法是什么?
- 通过比较C++中的行在 txt 文件中搜索的最简单方法是什么?
- 不带预处理器的调用方法/文件的文件名/行号
- 引用文件的适当方法是什么?
- 在文件中写入而不是在 c++ 中使用 "<<" 的替代方法?
- 查找定义我的 C/C++ 函数/宏的文件比'grep'更简单的方法
- 读取大文件(>2GB)(文本文件包含以太网数据)并通过不同参数随机访问数据的最佳方法是什么?
- 在C++中创建文件夹选取器对话框的最简单方法是什么?
- C++:std::ofstream 方法 open() 在第二次迭代时擦除打开的 ifstream 文件
- 如何使用 C/C++ 和 system() 系统调用以外的其他方法在 Linux 中获取文件功能?
- 创建进行生产构建并创建调试信息的C++生成文件的最佳方法?
- 是否有正确的方法对生成文件中的对象文件使用模板命令?(C++)
- 将位字符串转储到二进制文件的最佳方法是什么
- 在目录中查找所有.cpp.h文件(include,src等)的传统方法
- 通过boost asio iostream下载大文件的最快方法是什么?
- LNK2019 在文件中调用静态成员的方法时出错.cpp
- 在 *.cpp 文件中实现的 c++ 函数/方法永远不会内联扩展吗?