GTK-doc没有呈现结构的文档注释

时间:2015-04-09 10:00:29

标签: c documentation-generation

我在.h文件中有以下代码:

/**
 * udp_result_s:
 * @available: indicates the availability of the property stored in @data
 * @data: the property value (will only be meaningful if @available indicates its presence)
 * 
 * A transparent struct, representing the result of a query on a UDP object. Note that the @data field will contain unspecified junk *unless* @available is `udp_PRESENT`.
 */
typedef struct udp_result_s
{
  /*< public > */
  udp_availability available;
  void *data;
} udp_result_s;

出于某种原因,我完全不理解,这不会出现在GTK-doc生成的文档中。应该从这个文件生成的其他所有东西都是 - 我错过了一些非常明显的东西吗?

2 个答案:

答案 0 :(得分:0)

尝试:

typedef struct
{
  /*< public > */
  udp_availability available;
  void *data;
} udp_result_s;

答案 1 :(得分:0)

如果您将结构定义和typedef分开,它将起作用,例如:

/**
 * udp_result_s:
 * @available: indicates the availability of the property stored in @data
 * @data: the property value (will only be meaningful if @available indicates its presence)
 * 
* A transparent struct, representing the result of a query on a UDP object. Note that the @data field will contain unspecified junk *unless* @available is `udp_PRESENT`.
 */
struct udp_result_s
{
  udp_availability available;
  void *data;
};
typedef struct udp_result_s udp_result_s;