【问题标题】:How do I get Doxygen to "link" to enum defintions?如何让氧气“链接”到枚举定义?
【发布时间】:2011-01-21 01:29:32
【问题描述】:

我有以下代码:

/// \file Doxygen_tests.h

/**
 *
 * \enum    Tick_Column_Type
 *
 * \brief   Values that represent Tick_Column_Type. 
**/

enum Tick_Column_Type {
    TC_OPEN,         ///< Opening price
    TC_HIGH,         ///< High price

    TC_MAX,          ///< Required as last enum marker.  
};

/**
 *
 * \struct  Tick_Data_Row
 *
 * \brief   Holder for one row or snapshot of tick data.
 *
**/

struct __declspec (dllexport) Tick_Data_Row {
    Tick_Data_Row ();                       ///< Constructor.  Sets all columns to NaN
    void        init ();                    ///< Helper function to reset everything to NaN
    double  m_cols[TC_MAX];                 ///< The data.  Indexed by Tick_Column_Type.
};

一切似乎都正常(枚举最终在文件范围内,但我有一个 \file,所以它与描述一起出现,格式正确。

我想要(并且没有发生)是我希望 Tick_Data_Row::m_cols 文档中对 Tick_Column_Type 的引用链接回该文档页面。 Doxygen 通常似乎很聪明地弄清楚“啊哈,这是我知道的名字,我会热链接它”,但在这种情况下它无法做到。

如果我将枚举移动到结构中也没关系。

有什么线索吗?

【问题讨论】:

  • 我有同样的问题,提供的答案都没有为我解决问题

标签: c++ enums doxygen


【解决方案1】:

来自the docs (Automatic Link Generation):需要改变来自

///< The data.  Indexed by Tick_Column_Type.

///< The data.  Indexed by ::Tick_Column_Type.

【讨论】:

    【解决方案2】:

    以下内容对我有用。这是我定义枚举的方式-

    /** @brief An enumeration
     *  The return values of all the exported functions of GameEngine.dll
     */
    enum GE_RETURN_CODES
    {
        GE_FUNCTION_WORKED_PROPERLY = 0,    /*!<        0   the function worked properly    */
        GE_ERROR                            /*!<        Other Error - These errors are displayed by the Helper DLL  */
    };
    

    这就是我所说的-

    *   \return returns an #GE_RETURN_CODES value enum 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-26
      • 2019-11-30
      • 1970-01-01
      • 1970-01-01
      • 2018-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多