【发布时间】:2013-03-07 19:35:17
【问题描述】:
假设我有这个结构类型:
typedef struct Hidden Hidden;
struct Hidden
{
int foo;
int bar;
};
然后我有一个全局变量
Hidden visible;
Hidden 不应该被使用,visible 应该是Hidden 类型的唯一声明。我不想为Hidden 生成文档,因为我不想使用它,而是为visible 生成文档,其中包含有关它及其字段的所有信息。
我发现最接近的事情是,当您记录一个没有标签的struct 时:
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.
这是我想要实现的目标,但我不能使用无名结构。
这样的事情可能吗?
【问题讨论】: