【问题标题】:Demonstrating use of Doxygen in a Doxygen Code Block在 Doxygen 代码块中演示 Doxygen 的使用
【发布时间】:2017-09-25 23:50:07
【问题描述】:

我正在使用 Doxygen 创建一些文档,这些文档需要指明在特定上下文中使用 Doxygen 的“最佳实践”。

我有一些文件采用以下形式: (注意我使用的是 Doxygen 的 Markdown 扩展)

Best practices for documenting
==============================

Do it like this:

   /**
    * @defgroup my_new_group My first Doxygen Group
    * 
    * a brief desc.
    */
   ...

Markdown 预处理器在 Markdown 处理器运行之前首先处理 Doxygen 命令。

是否有任何选项来演示使用 Doxygen 的示例 Doxygen 用法?

【问题讨论】:

    标签: c markdown doxygen


    【解决方案1】:

    不确定我是否完全理解了这个问题。

    在任何情况下,要在文档本身中包含 doxygen 命令,都需要对这些命令进行转义。

    要么使用@verbatim xxx @endverbatim 按原样输出块,要么使用\@ 转义doxygen 命令

    【讨论】:

      【解决方案2】:

      在 Doxygen 手册中,它指定了如何define 组,然后如何添加到定义的组:

      To define a group, you should put the \defgroup command in a special 
      comment block. The first argument of the command is a label that should 
      uniquely identify the group. The second argument is the name or title of 
      the group as it should appear in the documentation. (allowing you to use 
      lower-case as the initial group name)
      

      因此,您应该使用与以下类似的内容来定义您的组:

      /** Group Defines
       * @\defgroup foobar foobar
       */
      

      在整个代码中,添加一个函数等,您可以使用如下内容:

      /**
       * @addtogroup foobar
       * @{
       *     (some documentation elements...)
       * @}
       */
      

      【讨论】:

        猜你喜欢
        • 2012-11-24
        • 2014-04-29
        • 1970-01-01
        • 2018-01-18
        • 2011-06-27
        • 2020-08-03
        • 2012-07-28
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多