代码之家  ›  专栏  ›  技术社区  ›  much

doxygen:一个描述框中有两个makro

  •  0
  • much  · 技术社区  · 9 年前

    我想在我的doxygen HTML文档中连接两个相关的define makros,使它们显示在一个描述框中。

    我希望我能清楚地描述它应该是什么样子:通常每个define语句都有自己的描述框 /** @define <description> */ 。这将导致一个描述框,其中代码部分位于框的标题行中,而简短描述位于框内容中。

    我现在想做的是将两个define语句连接起来,使它们显示在一个带有共同描述的框中。有人知道实现这一点的方法吗?

    PS:也许这张ASCII图会更清晰一点。

    +-------------------------+ | #define PORT 1 | | #define PORTDIR 0 | +-------------------------+ | output port definitions | +-------------------------+

    1 回复  |  直到 9 年前
        1
  •  0
  •   doxygen    9 年前

    您可以使用 @name @{ .. @} 。这是一个小例子。同时设置时效果最佳 SUBGROUPING NO 在配置文件中。

    /** @file
     *  File documentation
     */
    
    /** @name Output ports definitions
     *  @brief Brief description for the group.
     *  @{
     */
    #define PORT    1 /**< @brief The port number */
    #define PORTDIR 0 /**< @brief The port direction */
    /** @} */
    
    /** @brief A lonely macro */
    #define LONELY  2
    

    如果省略了单个宏的文档,则可以关闭所请求的内容,只有文档位于组的上方而不是下方。