禁止为未记录的成员功能使用氧气警告,但要注意的地方 [英] Suppress doxygen warning for undocumented member function, but leave synopsis in place

查看:74
本文介绍了禁止为未记录的成员功能使用氧气警告,但要注意的地方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种抑制关于未记录的成员函数的doxygen警告的方法,但不使用 //! @cond //! @endcond ,因此成员函数仍出现在类的提要中。像这样的东西:

I'm looking for a way to suppress doxygen warnings about undocumented member functions, but without using //! @cond and //! @endcond, so the member functions still appear in the synopsis of the class. Something like the following:

class Foo
{
public:
    Foo();
    Foo(const Foo&);
    Foo& operator=(const Foo&);
};

这些成员函数做的很明显,不需要文档,但我仍然希望它们出现在文档的可用成员函数列表中(因为知道类是可复制/可分配的事项)。照这样,doxygen会针对每个警告发出未记录警告。如果我使用 //! @cond //! @endcond ,这些方法将从文档中完全消失。我想让这些方法在文档中保持可见,但无需进一步评论,我希望氧气不要抱怨它们没有被记录。

These member functions do the obvious thing and don't need documentation, but I still want them to appear in the list of available member functions in the documentation (because knowing that a class is copyable/assignable matters). As is, doxygen emits a "not documented" warning for each of these. If I use //! @cond and //! @endcond, the methods disappear completely from the documentation. What I would like is for the methods to remain visible in the documentation, but without any further comments, and I want oxygen to not complain about them being undocumented.

某种虚拟评论告诉doxygen关于缺少doc的信息,但是仍然保留了文档中的方法,因此它们是可见的?

Is there some kind of "dummy comment" to tell doxygen to shut up about the lack of doc, but still preserve the methods in the documentation, so they are visible?

推荐答案

您只需要添加方括号。这对我有用:

You just need to add brackets. This works for me:

//! \{
const int myVar3 = 3;
const int myVar4 = 3;
//! \}

没有警告,它仍然显示在输出中。如果愿意,您可以将此通称别名为 \nowarn \endnowarn

There is no warning and it still appears in the output. You may alias this commants to \nowarn and \endnowarn if you like.

这篇关于禁止为未记录的成员功能使用氧气警告,但要注意的地方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆