使用Doxygen记录枚举类型

4
由doxygen生成的枚举类型的HTML文档将枚举值列在左侧,文档列在右侧。但是我需要每个值的相当详细的文档,而有些名称非常长,因此使得右侧文档列显得过于靠右,显得非常糟糕。是否有可能使每个值的文档出现在值的上方或下方,而不是在右侧?
2个回答

8
我正在使用Doxygen 1.7.5.1。我遇到了类似的情况,我从电子表格中生成了大约1000个成员的枚举。我希望整数值在右边,并且Doxygen位于成员上方。
我只需在成员名称上方使用三个斜杠。对于多行注释,我在需要时插入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文件: test.h的Doxygen生成文档

0

使用doxygen 1.5.5,我无法复现您所描述的行为。我得到了类似于参数列表文档的枚举文档。

我的观察结果与\enum命令其渲染的Doxygen文档一致。


是的,它是一致的,我只是想知道它是否可以更改,因为默认行为在我的情况下效果不佳。在渲染示例中(您提供的链接),您可以看到枚举本身的文档位于顶部,而对于值,文档位于右侧。 - Zitrax
我已经再次尝试了一下,感谢您的评论,现在我理解了问题所在。从Doxygen示例中,我向AnotherEnum添加了一个长的V3V3V3...。行为与您所描述的完全相同。不幸的是,我不知道有什么解决方法。 - mouviciel

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接