【问题标题】:How do I comment a Obj C typedef block with doxygen如何使用 doxygen 注释 Obj C typedef 块
【发布时间】:2015-04-20 13:24:20
【问题描述】:

当我在这个 Obj-C 代码上运行 doxygen 时,签名和注释都不会出现在 HTML 输出中。我是否需要添加标签 (@typedef) 或传入设置,例如 ENABLE_PREPROCESSING、MACRO_EXPANSION、EXPAND_ONLY_PREDEF、PREDEFINED 和 显示文件?我尝试了几种组合都没有运气。

/**
 * This is the brief comment.  This is the detailed comment.
 *
 * @param error The error describing failure.
 */
typedef void(^ServiceCompletion)(NSError *error);

提前感谢您的帮助。

【问题讨论】:

标签: objective-c comments doxygen typedef


【解决方案1】:

答案是@related 标签(也称为\related、@relates 和\relates)。没有其他的。非常简单和优雅。这个标记告诉 Doxygen 它标记的 typedef MyService 接口有关。这个标签是必需的,因为 typedef 不是接口的成员。

Dimitri 自己提供了解决方案:https://bugzilla.gnome.org/show_bug.cgi?id=720046

/**
 * @related MyService
 *
 * This is the brief comment.  This is the detailed comment.
 *
 * @param error The error describing failure.
 */
typedef void(^ServiceCompletion)(NSError *error);

@interface MyService : NSObject
...
@end

【讨论】:

    猜你喜欢
    • 2012-11-06
    • 2015-09-16
    • 2013-01-01
    • 2012-09-01
    • 1970-01-01
    • 2023-03-12
    • 2018-06-24
    • 2018-06-09
    • 2013-04-27
    相关资源
    最近更新 更多