【发布时间】:2011-06-14 06:35:09
【问题描述】:
如果我无法更改文件中有一个类,但我需要在 doxygen 中记录,那么最好的方法是什么?我知道最好在实际的 .h 或 .cpp 文件中记录,但在这种特定情况下,这是不可能的。
我已经知道如何记录一些成员,但我无法以可靠的方式记录操作员。让我举个例子。这是一个示例类,其中一个成员引起了问题并且工作正常:
class Foo
{
public:
int Bar();
bool operator!() const;
};
在 doxygen 浏览的其他文件中,我放了以下内容:
/// @fn Foo::Bar
/// @brief Some info about the constructor
/// @return Some stuff about what bar returns
构造函数的文档有效,但这不起作用:
/// @fn Foo::operator!
/// @brief Some info about the operator
/// @return Some stuff about what the operator! returns
也没有:
/// @fn operator!
/// @memberof Foo
/// @brief Some info about the operator
/// @return Some stuff about what the operator! returns
我还尝试使用 % 和 .所以它看起来像“/// @fn %operator!”、“/// @fn operator%!”或“/// @fn 运算符!”但没有什么像这样的帮助。
关于操作员的信息永远不会出现。有几次我尝试在操作符 doxygen cmets 中输入一个唯一值,并在 doxygen 输出中对其进行 grepping,但结果是空的。我做错了什么?
【问题讨论】: