Doxygen无法正确识别属性 [英] Doxygen not properly recognizing properties

查看:84
本文介绍了Doxygen无法正确识别属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Objective-C上有一个如下定义:

I have a definition on Objective-C that looks like this:

@property(nonatomic, retain) BOOL myProperty NS_AVAILABLE_IOS(3_2);

使用Doxygen解析此头文件时,其类型为 BOOL myprop,名称为 NS_AVAILABLE_IOS和参数为(3_2)。

When parsing this header file with Doxygen, it gets the type as "BOOL myprop", the name as "NS_AVAILABLE_IOS" and the arguments as "(3_2)".

有什么方法可以使Doxygen正确地识别出这一点而无需添加注释(我无法修改文件) ?也许让它忽略了NS_AVAILABLE_IOS宏?

Is there any way of making Doxygen recognize this properly without adding comments (I can't modify the files)? Maybe making it ignore the NS_AVAILABLE_IOS macro?

推荐答案

您应该让doxygen的预处理器删除宏调用。为此,请使用以下配置设置:

You should let doxygen's preprocessor remove the macro invocation. To do this use the following configuration settings:

ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = YES
PREDEFINED             = NS_AVAILABLE_IOS(x)=

请参见 http://www.doxygen.org/manual/preprocessing.html 了解详情。

这篇关于Doxygen无法正确识别属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆