記錄於2013/4/23:
html
這些tag不能出如今一個HeaderDoc
註釋的開頭,由於它們與頂級標籤相沖突
|
@function HMBalloonRect
|
@abstract Reports size and location of help ballon.
|
@discussion Use HMBalloonRect to get information about the size of a help balloon
|
before the Help Manager displays it.
|
@param inMessage The help message for the help balloon.
|
@param outRect The coordinates of the rectangle that encloses the help message.
|
The upper-left corner of the rectangle has the coordinates (0,0).
|
*/
|
|
* @function HMBalloonRect
|
* @discussion Use HMBalloonRect to get information about the size of a help balloon
|
* before the Help Manager displays it.
|
|
* Always check the help balloon size before display.
|
|
Tag
|
Example
|
Identifies
|
Usage
|
@abstract
|
@abstract write the track to disk
|
一個簡短的字符串簡要描述一個函數,數據類型等等,只能爲1行。保存discussion的詳細說明
|
block
(single short sentence recommended)
|
@availability
|
@availability 10.3 and later
|
一個字符串描述函數、類等等的可用性 |
attribute
|
@discussion
|
@discussion This is what this function does. @some_other_tag
|
一個文本塊,詳細描述一個函數,類,標題,或數據類型;它便可包含多個字斷也可省略;可是若是你的數據類型、函數、類或頭名中存在多個字段,則改文本塊就必須存在;該文本塊僅在另外一個標籤開始時才結束
|
block
|
@namespace
|
@namespace BSD Kernel
|
一個字符串描述函數、數據類型等所存在的命名空間
|
attribute
|
@updated
|
@updated 2003-03-14
|
header的更新時間
|
attribute
|
@method用於Objective-C方法,這兩個能夠互換
Tag
|
Example
|
Identifies
|
Type
|
@param
|
@param myValue The value to process.
|
描述函數或回調的參數
|
attribute (term & definition)
|
@result
|
@result Returns 1 on success, 0 on failure..
|
描述該函數返回的值,若是函數類型是void或者OSERR則不寫該標籤
|
attribute (term & definition)
|
@return
|
@return Returns 1 on success, 0 on failure..
|
同上
|
attribute (term & definition)
|
@throws
|
@throws bananas
|
該函數的每一個異常拋出都包含一個@throws標籤(若是支持異常)
|
attribute
|
@var
|
@var myVar
Description goes here
|
標記一個函數或方法的局部變量;
注意:不能做爲函數或者方法的頂端標籤
|
Term & definition
|
|
@const kCFTypeArrayCallBacks
|
@abstract Predefined CFArrayCallBacks structure containing a set of callbacks appropriate...
|
@discussion Extended discussion goes here.
|
Lorem ipsum....
|
*/
|
const CFArrayCallBacks kCFTypeArrayCallBacks;
|
|
@var we_are_root
|
@abstract Tells whether this device is the root power domain
|
@discussion TRUE if this device is the root power domain.
|
For more information on power domains....
|
*/
|
bool we_are_root;
|
Tag
|
Example
|
Identifies
|
Type
|
@callback
|
@callback testFunc The test function to call.
|
指定結構中的一個回調字段的名稱和描述
|
attribute (term & definition)
|
@field
|
@field isOpen Specifies whether the file descriptor is open.
|
結構聲明中的一個字段
|
attribute (term & definition)
|
|
@struct TableOrigin
|
@abstract Locates lower-left corner of table in screen coordinates.
|
@field x Point on horizontal axis.
|
@field y Point on vertical axis
|
@discussion Extended discussion goes here.
|
Lorem ipsum....
|
|
struct TableOrigin {
|
int x;
|
int y;
|
}
|
•惟一的特定與枚舉的的標籤是@const 和 @constant;
Tag
|
Example
|
Identifies
|
Type
|
@constant
@const
|
@const kSilly A silly return value.
|
枚舉中的常量
|
attribute (term & definition)
enum declarations only
|
|
@abstract Categorizes beverages into groups of similar types.
|
@constant kSoda Sweet, carbonated, non-alcoholic beverages.
|
@constant kBeer Light, grain-based, alcoholic beverages.
|
@discussion Extended discussion goes here.
|
Lorem ipsum....
|
|
enum beverages {
|
kSoda = (1 << 6),
|
kBeer = (1 << 7)
|
};
|
|
@enum Beverage Categories
|
@abstract Categorizes beverages into groups of similar types.
|
@constant kMilk Dairy beverages.
|
@constant kWater Unflavored, non-sweet, non-caloric, non-alcoholic beverages.
|
@discussion Extended discussion goes here.
|
Lorem ipsum....
|
|
enum {
|
kMilk = (1 << 8),
|
kWater = (1 << 9)
|
};
|
|
@typedef TypedefdSimpleStruct
|
@abstract Abstract for this API.
|
@field firstField Description of first field
|
@field secondField Description of second field
|
@discussion Discussion that applies to the entire typedef'd simple struct.
|
Lorem ipsum....
|
|
typedef struct _structTag {
|
short firstField;
|
unsigned long secondField
|
} TypedefdSimpleStruct;
|
|
@typedef TypedefdEnum
|
@abstract Abstract for this API.
|
@constant kCFCompareLessThan Description of first constant.
|
@constant kCFCompareEqualTo Description of second constant.
|
@constant kCFCompareGreaterThan Description of third constant.
|
@discussion Discussion that applies to the entire typedef'd enum.
|
Lorem ipsum....
|
|
typedef enum {
|
kCFCompareLessThan = -1,
|
kCFCompareEqualTo = 0,
|
kCFCompareGreaterThan = 1
|
} TypedefdEnum;
|
|
@typedef simpleCallback
|
@abstract Abstract for this API.
|
@param inFirstParameter Description of the callback's first parameter.
|
@param outSecondParameter Description of the callback's second parameter.
|
@result Returns what it can when it is possible to do so.
|
@discussion Discussion that applies to the entire callback.
|
Lorem ipsum...
|
*/
|
typedef long (*simpleCallback)(short inFirstParameter, unsigned long long *outSecondParameter);
|