Hi Christopher,

On Sep 17, 2013, at 21:02 , Marshall Christopher D. <cmarsh...@nikon.net> wrote:
> Folks,
> 
> I have a file with a bunch of typedefs.
> 
> I'm using Apple's recommended method of defining a NS_ENUM macro to declare 
> enumeration typedefs.
> 
> Normally, I'd define a typedef like so:
> 
> typedef enum
> {
> MyCoolEnum_Value1
> = 1,
> MyCoolEnum_Value2
> = 2
> } MyCoolEnum;
> 
> However, Apple (Objective C 2.0, really) has created a macro that allows you 
> to assign a datatype to the enum, like so:
> 
> typedef NS_ENUM ( uInt_16, MyCoolEnum )
> {
> MyCoolEnum_Value1
> = 1,
> MyCoolEnum_Value2
> = 2
> };
> 
> Unfortunately, when Doxygen hits this, it sets the enum as "NS_ENUM", instead 
> of "MyCoolEnum".
> 
> Is there any way for me to get Doxygen to recognize the enum, or should I 
> discard the Apple method, and use the plain old-fashioned C++ enum?
> 

You can program doxygen's C-preprocessor to replace NS_ENUM, like so

ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = YES
PREDEFINED             = NS_ENUM(x,y)=y

Regards,
  Dimitri


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Reply via email to