如何让 Doxygen “链接”枚举定义?
我有以下代码:
/// \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 通常似乎非常聪明地找出“啊哈,这是我知道的名称,我将热链接它”。 “,但在这种情况下它失败了。
如果我将枚举移到结构内部也没关系。
有任何线索吗?
I have the following code:
/// \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.
};
Everything seems to work fine (the enum ends up at file scope, but I have a \file, so it appears, along with the descriptions, correctly formatted.
What I want (and is not happening) is that I'd like the reference to Tick_Column_Type in the documentation for Tick_Data_Row::m_cols to link back to that document page. Doxygen usually seems to be quite smart at figuring out "aha, that's a name I know, I'll hot-link it", but it fails to do so in this case.
It does not matter if I move the enum inside the struct.
Any clues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自文档(自动链接生成):需要从 更改
为
From the docs (Automatic Link Generation): One needs to change from
to
以下内容对我有用。这是我定义枚举的方式 -
这是我引用它的方式 -
The following worked for me. Here is how I defined the enum -
And here is how I referred to it -