【发布时间】:2019-06-30 04:16:19
【问题描述】:
我需要在 doxygen 组页面上获取所有类(和其他元素)的列表,即使它们是命名空间成员。 因此,如果我有类似这样的代码示例:
/*!
@defgroup test_group Example group
@{*/
class some_class {};
/// @}
Doxygen 将生成组页面,包含我的“some_class”:
.
但是在命名空间添加 doxygen 之后,所有命名空间成员“隐藏”到新页面。下一个代码:
/*!
@defgroup test_group Example group
@{*/
namespace example_namespace {
class some_class {};
}
/// @}
产生一个组页面,包含指向命名空间页面的链接。
.
我们在群组页面上看不到命名空间成员。
接下来的 2 种方式给出相同的结果:
// 1. putting namespace content in brackets @{ @}:
/// @defgroup test_group Example group
namespace example_namespace {
/*!
@ingroup test_group
@{ */
class some_class {};
/// @}
}
// 2. putting namespace itself to group:
/// @defgroup test_group Example group
/// @ingroup test_group
namespace example_namespace {
class some_class {};
}
我想要一个组页面,它将包含来自命名空间和命名空间本身的所有类。我知道在类描述中添加“@ingroup”可以满足我的需求,但在实际程序中,一个命名空间中有数十个甚至数百个类。一定有更好的办法。
【问题讨论】:
标签: c++ namespaces grouping doxygen