【发布时间】:2011-01-17 13:12:53
【问题描述】:
我在使用 Doxygen 识别命名空间和模块时遇到问题。我认为问题在于是将\addtogroup 放在命名空间内还是命名空间外。
示例1,命名空间外:
/*!
* \addtogroup Records
* @{
*/
//! Generic record interfaces and implementations
namespace Records
{
//! Describes the record interface
class Interface;
} // End namespace Records
/*! @} End of Doxygen Groups*/
示例 2 - 在命名空间内
//! Generic record interfaces and implementations
namespace Records
{
/*!
* \addtogroup Records
* @{
*/
//! Describes the record interface
class Interface;
/*! @} End of Doxygen Groups*/
} // End namespace Records
我希望namespace Records 出现在 Doxygen Namespaces 选项卡下,并间接显示在 Modules 选项卡下。单击 Namespaces 页面中的项目应生成包含Records::Interface 的页面。单击 Modules 选项卡中的项目也会生成一个包含Records::Interface 的页面。
在我的 Doxygen 文档中,我在 Modules 中的 Namespaces 选项卡中缺少一些项目,反之亦然,这是由于这种困境导致我的不一致。
那么哪个是正确的方法,示例 1 或示例 2?
{Doxygen 手册对此主题并不清楚。}
Doxygen: \addtogroup
Doxygen: documenting namespaces
【问题讨论】:
标签: c++ namespaces doxygen documentation-generation doxygen-addtogroup