假设我有这个结构类型:
typedef struct Hidden Hidden;
struct Hidden
{
int foo;
int bar;
};
然后我有一个全局变量
Hidden visible;
Hidden永远不应该使用并且visible应该是 type 的唯一声明Hidden。我不想生成文档,Hidden因为我不想使用它,而是生成文档,visible其中包含有关它及其字段的所有信息。
我发现的最接近的事情是,当您记录struct没有标签的 a 时,例如:
struct
{
int foo; ///< Number of particals in the universe.
int bar; ///< Number of socks in the drawer.
} Baz; ///< Nameless struct variable.
Doxygen 会生成
struct {
int foo
Number of particals in the universe.
int bar
Number of socks in the drawer.
} Baz
Nameless struct variable.
这是我想要实现的目标,但我不能使用无名结构。
这样的事情可能吗?