【问题标题】:Documenting enums using doxygen使用 doxygen 记录枚举
【发布时间】:2010-10-07 12:04:02
【问题描述】:

doxygen 为枚举生成的 html 文档将枚举列在左侧,将文档列在右侧。但是,我需要为每个值提供非常详细的文档,并且其中一些名称很长,因此使带有文档的右列出现在右侧很远并且看起来很糟糕。是否不可能使每个值的文档显示在值的下方或上方而不是右侧?

【问题讨论】:

    标签: html enums format doxygen


    【解决方案1】:

    我正在使用 Doxygen 1.7.5.1。我也遇到过类似的情况……我列举了大约 1000 个左右的成员,这些成员是从电子表格生成的。我希望整数值偏右,成员上方的 Doxygen 位。

    我所做的只是在成员名称上方使用三斜杠。对于多行 cmets,我在需要的地方插入了 HTML 换行符。我只写了第一节,但我认为这很明显。注意:第一行因句号而换行。后面的行没有。

    ///
    /// \file test.h
    /// \brief Test of Doxygen enum commenting.
    ///
    
    //! A test of Doxygen commenting.
    typedef enum _DOXYGEN_TEST
    {
    
        /// This is a single line comment.
        Member_001,                            //  1
    
        /// This is a mutli-line comment.
        /// 'Twas brillig, and the slithy toves       <br>
        /// Did gyre and gimble in the wabe;          <br>
        /// All mimsy were the borogoves,             <br>
        /// And the mome raths outgrabe.              <br>
        /// "Beware the Jabberwock, my son!           <br>
        /// The jaws that bite, the claws that catch! <br>
        /// Beware the Jubjub bird, and shun          <br>
        /// The frumious Bandersnatch!"
        /// 
        /// He took his vorpal sword in hand:
        /// Long time the manxome foe he sought--
        /// So rested he by the Tumtum tree,
        /// And stood awhile in thought.
        /// 
        /// And as in uffish thought he stood,
        /// The Jabberwock, with eyes of flame,
        /// Came whiffling through the tulgey wood,
        /// And burbled as it came!
        /// 
        /// One, two! One, two! and through and through
        /// The vorpal blade went snicker-snack!
        /// He left it dead, and with its head
        /// He went galumphing back.
        /// 
        /// "And hast thou slain the Jabberwock?
        /// Come to my arms, my beamish boy!
        /// O frabjous day! Callooh! Callay!"
        /// He chortled in his joy.
        /// 
        /// 'Twas brillig, and the slithy toves
        /// Did gyre and gimble in the wabe;
        /// All mimsy were the borogoves,
        /// And the mome raths outgrabe.
        Member_002,                            //  2
    
    }
    Doxygen_test;
    

    生成的 Doxygen 生成文件:

    【讨论】:

      【解决方案2】:

      使用 doxygen 1.5.5,我没有成功重现您描述的行为。我得到一个类似于参数列表文档的枚举文档。

      我观察到的内容与 \enum commandits rendering 的 Doxygen 文档一致。

      【讨论】:

      • 是的,它是一致的,我只是想知道它是否可以更改,因为默认行为在我的情况下效果不佳。在示例渲染(您提供的链接)中,您可以看到枚举本身的文档位于顶部,而值的文档位于右侧。
      • 我又试了一次,多亏了你的评论,我现在明白了这个问题。从 Doxygen 示例中,我添加了一个长 V3V3V3... 到 AnotherEnum。行为与您描述的完全一样。不幸的是,我不知道解决方法。
      猜你喜欢
      • 2012-11-24
      • 2014-09-03
      • 2014-03-02
      • 2014-10-07
      • 2014-04-10
      • 2013-04-20
      • 2012-08-15
      • 2020-09-19
      • 1970-01-01
      相关资源
      最近更新 更多