Created
October 22, 2011 14:06
-
-
Save pilky/1306041 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- If something has an underscore it is classed as private and ignored | |
- If a typedef appears multiple times (eg in an #if statement) the first documented one is used | |
- Enums that have both a type def and a name (@enum name) will have the title "type - doc name" | |
- Any functions or macros found will be placed in a separate functions page | |
- Constants groups and typedefs in separate files can be related to a class with (@class name). They can have multiple @class statements | |
- Any constants groups or typedefs found in files that don't contain classes and aren't that related to classes are put in separate constants and data types pages | |
//enums | |
/** | |
@enum My Great Enum | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
enum { | |
/** | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
a = 0, | |
/** */ | |
b = 1, | |
/** */ | |
c = 2 | |
}; | |
/** | |
@enum My Great Enum | |
Description | |
*/ | |
enum { | |
/** */ | |
a = 0, | |
/** */ | |
b = 1, | |
/** */ | |
c = 2 | |
}; | |
typedef NSInteger MYEnum; | |
/** | |
Description | |
*/ | |
typedef enum { | |
/** */ | |
a = 0, | |
/** */ | |
b = 1, | |
/** */ | |
c = 2 | |
} MYEnum; | |
//structs | |
/** | |
@struct MyStruct | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
typedef struct _MYStruct { | |
/** | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
int a; | |
/** */ | |
int b; | |
} MYStruct; | |
//typedef | |
/** | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
typedef MYType MYNewType | |
//String constants | |
/** | |
@constants Name | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
/** | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
extern NSString *foo; | |
/** | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
extern NSString *bar; | |
/** | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
extern NSString *baz; | |
//Notifications | |
/** | |
@notification foo | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
extern NSString *foo; | |
/** | |
@notification bar | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
extern NSString *bar; | |
/** | |
@notification baz | |
Description | |
@info key description | |
@info key description | |
@available MYApp 1.0 and later | |
*/ | |
extern NSString *baz; | |
//Define constants | |
/** | |
@constants Name | |
Description | |
*/ | |
/** | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
#define MYFoo 1 | |
/** | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
#define MYFoo 2 | |
/** | |
Description | |
@available MYApp 1.0 and later | |
*/ | |
#define MYFoo 3 | |
//C Functions | |
/** | |
Description | |
@param a Blah | |
@param b Blah | |
@return Something | |
*/ | |
BOOL someFunction(int a, int b) | |
//Macros | |
/** | |
Description | |
@param a Blah | |
@param b Blah | |
@return Something | |
*/ | |
#define someMacro(a, b) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment