【问题标题】:Documenting C++ aliases in Doxygen在 Doxygen 中记录 C++ 别名
【发布时间】:2016-05-06 05:52:16
【问题描述】:

使用前面的适当注释,Doxygen 会为 classstructnamespace 声明生成条目,但不会生成 typedefusing 的出现。

在这个例子中

/// here is my typedef
typedef int MyTypedef;

/// here is my namespace
namespace MyNamespace 
{
  /// here is my other typedef
  typedef int MyOtherTypedef;
}

我在MyNamespace 甚至MyOtherTypedef 的文档中找到了一个条目,但MyTypedef 没有任何内容。为什么不呢?

【问题讨论】:

    标签: c++ alias doxygen typedef using


    【解决方案1】:

    答案与为什么functionspreprocessor definitions 的条目不会自动生成的答案相同。

    Doxygen 将别名、变量、函数和宏(但不是类或命名空间)视为“对象”。并且所有“对象”都记录在案iff,它们的包含文件、类或命名空间也记录在案。

    要使 MyTypedef 出现在您的文档中,请添加:

    /// \file
    /// here is my file
    

    文件全局范围内的任何位置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-20
      • 2011-01-05
      • 2011-05-31
      • 2011-06-03
      • 2017-08-14
      • 1970-01-01
      • 2011-01-17
      • 2011-04-09
      相关资源
      最近更新 更多