0

我想评论大枚举并将一些枚举元素分组(彼此跟随)

想象这样的枚举:

/** @brief device OpCodes
 */
typedef enum opCodes_e {
    A = 0, ///< init
/** @addtogroup bluetooth commands group
 *  @{
 */
    B0 = 1, ///< BLE connect
    B1 = 2, ///< BLE disconnect
/** @} */
    C = 3  ///< handle pressure sensor
} t_opCodes;

而且我要:

  1. 结果是一张桌子。
  2. 还有组名
  3. 直观地显示组内有哪些枚举元素

例如结果可能如下所示:

device OpCodes
A        init
---------------------------
bluetooth commands group
  B0     BLE connect
  B1     BLE disconnect
---------------------------
C        handle pressure sensor

我不希望有任何特定的观点。以上只是说明我想要的。你知道在 doxygen 中是否有可能发生这样的事情?如果是,那怎么办?

4

1 回答 1

0

让它工作有点棘手,这个解决方案只用于 HTML 输出

/** @brief device OpCodes
 */
typedef enum opCodes_e {

A = 0, /**< inlet2 */
/**< @htmlonly <tr><td colspan=2 align=center class="fieldname"><b>BlueTooth</b></td></tr> @endhtmlonly */
B0 = 1, ///< BLE connect2
B1 = 2, ///< BLE disconnect2
C = 3  ///< handle pressure sensor
} t_opCodes;

注意:A 的头部必须在 /** ..*. 否则会出现一个额外的空行。

于 2016-04-10T17:52:55.557 回答