gpt4 book ai didi

objective-c - 如何配置 Doxygen 以正确记录 Objective-C 类别

转载 作者:太空狗 更新时间:2023-10-30 03:53:43 25 4
gpt4 key购买 nike

Doxygen 似乎对 Objective-C 类别有特殊处理,我想知道其他人是否能够成功解决它。我希望 doxygen 将类中的所有类别记录为单独的实体,而不管是否记录了基类。

如果我将 doxygen 标记添加到一个未记录 基类的类别 - 比如 NSString,然后 doxygen 会将该类别及其方法作为单独的实体列在类列表中。

/**
* @category NSString(Foo)
* @brief A sample category on NSString
*/
@interface NSString(Foo)
@end

在类列表中产生记录的实体 NSString(Foo)。

但是,下面的例子不会:

/**
* @category CCFMyCustomClass(Foo)
* @brief A category on a documented base class
*/
@interface CCFMyCustomClass(Foo)
@end

相反,在后一种情况下,CCFMyCustomClass(Foo) 上的所有方法都包含在 CCFMyCustomClass(基类)的文档中。

以下内容虽然经常被引用,但似乎对解决这个问题没有帮助:

最佳答案

您可以跳过 Doxygen 并使用 AppleDoc .

appledoc is command line tool that helps Objective-C developers generate Apple-like source code documentation from specially formatted source code comments. It's designed to take as readable source code comments as possible for the input and use comments as well as surrounding source code to generate visually appealing documentation in the form of HTML as well as fully indexed and browsable Xcode documentation set. Although there are several tools that can create HTML documentation for Objective-C, all of those know to me fall short in meeting the minimum of goals described below.

它也可以在 GitHub 上找到

关于objective-c - 如何配置 Doxygen 以正确记录 Objective-C 类别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4596864/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com