Doxygen incorrectly recognizes properties

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

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

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

Is there a way to get Doxygen to recognize this correctly without adding comments (I cannot modify the files)? Maybe this ignores the macro NS_AVAILABLE_IOS?

0
source share
2 answers

You must allow the doxygen preprocessor to remove the macro call. To do this, use the following configuration parameters:

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

See http://www.doxygen.org/manual/preprocessing.html for more details.

+2
source

Using

 @property (nonatomic, assign) BOOL myProperty; 

or

 @property (nonatomic, assign, getter=isWorking) BOOL myProperty; 
0
source

Source: https://habr.com/ru/post/949174/


All Articles