在文档中引用使用doxygen的结构成员不起作用;结构成员未出现在文档中
Referencing struct member in documentation using doxygen not working; struct member not appearing in documentation
运行氧气
namespace BV
{
namespace Data
{
typedef struct Station {
uint offsetId; //! The ID of a station is generated by adding an offset to a base (example: 1000)
uint id; //! The ID of the station (see {@link Station.offsetId} for more details)
QString name; //! Name of the station
QStringList lineSwitches; //! A list of available lines the passanger can switch to from the station
} Station;
...
}
}
退货警告
/home/USER/Projects/HelloWorld/src/csvparser.h:16:警告:无法解析 \link 命令的"Station.offsetId"链接
最初我只有offsetId
而不是Station.offsetId
但在网上查看后,我看到了一堆示例(包括 SO 上的这里)描述这是这样。此外,我还想在标题的其他部分中引用此成员。
不仅从上面收到警告,而且我只是查看了为我的结构生成的 HTML 文档,令我惊讶的是它甚至不存在:
公共属性
uint id
The ID of a station is generated by adding an offset to a base (example: 1000)
Q名称
The ID of the station (see **Station.offsetId** for more details)
QStringList lineSwitchs
Name of the station.
Station.offsetId 只是一个断开的链接。
问题中所述的文档使用 //!
作为注释字符串,这旨在用于成员之前。在成员之后有文档时,应该使用 //!<
.另请参阅doxygen手册中的"将文档放在成员之后"。
作为第二部分,没有必要使用:{@link Station.offsetId}
(实际上link
也应该有一个endlink
。更好的是使用ref
或#
例如 ref Station.offsetId
或#offsetId
或ref offsetId
或(在这种情况下)只是Station.offsetId
.
相关文章:
- 具有结构成员char数组的sscanf
- 仅使用结构名称访问结构成员
- 使用 structType*& 赋给结构成员
- 使用结构成员指针在C++中填充结构
- 聚合初始化,将成员指针设置为同一结构成员
- 为什么结构化绑定不使用"auto&"返回对结构成员的引用,而是返回成员本身
- 是否可以将结构数组别名为结构成员数组?
- 结构成员在访问时被清除
- 如何指示结构成员没有锯齿?
- 为什么继承的结构成员在联合中无法访问?
- 尝试在 qml 中访问结构成员的 QList
- C++/CLI -- 访问结构成员
- 调用在类中声明的结构成员
- 对结构成员的临时绑定引用
- 无法使用 strcpy 将字符串复制到静态结构成员
- 为什么类成员数据必须是静态的才能被模板化类的模板化结构成员访问
- 填充模板化结构类型的结构成员
- C/C++intellisense 0.26.1不显示结构成员列表
- 在源文件中创建具有结构成员的结构
- 如何访问结构成员作为指针