HeadDoc自动注释语法
记录于2013/4/23:
这些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)
|
|
};
|
Type Definitions:(类型定义)
|
/*! |
|
@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);
|
HeadDoc自动注释语法的更多相关文章
- Doxygen 注释语法规范
背景 这一块的内容更多的是作为了解,但是可以以这样的规范作为自己的编程注释习惯,提高自己的软实力. Doxygen注释语法 注释格式 块注释建议统一使用 /** -- ***/ 行注释建议统一使用 / ...
- pycharm基本使用python的注释语法
pychram基本使用 1.主题选择 file settings Editor color Scheme 2.pycharm切换解释器 file settings Project Python Int ...
- pycharm的基本使用 、 Python的注释语法,变量,常量,垃圾回收机制,数据类型
1.文件路径要注意 我把文件放在了D盘,如下图:你们可以根据自身情况设置 2.python环境要选择本地下载好的 如下图: 点击本机存在的环境,如果提示NO interpr,就点击第二步 如果还是没有 ...
- Less注释语法
Less注释语法 适当的注释是保证代码可读性的必要手段,Less支持两种类型的注释:多行注释和单行注释. 1)形如 /* */ 的多行注释.如: /* Hello, I'm a CSS-style c ...
- Playground中格式注释语法
类似于Ruby的ruby document,Xcode的Playground自身也提供一些嵌入文档中的格式注释的语法. 我们先定义一个简单的类: class A{ } 按住opt点击class A,你 ...
- 【逆向工具】IDA使用5-( string、图形化与视图的切换、图形化显示反汇编地址、自动注释、标签使用)
分析petya病毒时新学会的技巧. IDA技巧1 : string 提取文件中的字符串内容,如果看到一些文件字符串可以定位到关键的函数中. view -> open subview -> ...
- vim 自动注释
开启了自动注释和自动缩进对粘帖代码不方便 关闭自动注释 :set fo-=r 关闭自动缩进(这个对C/C++代码好像无效) :set noautoindent 关闭C语言缩进 :set noc ...
- Xocde 自动注释插件
github 地址 https://github.com/onevcat/VVDocumenter-Xcode 可以对xcode方法进行类似java那样的自动注释 源码下载下后编译运行一次 xo ...
- vscode dart 插件 关闭自动注释
vscode dart 插件 关闭自动注释 左下角设置 --> 搜索 Closing Labels --> 去掉勾选
随机推荐
- 解决python编码问题
从网上抓了一些字节流,想打印出来结果发生了一下错误: UnicodeEncodeError: 'gbk' codec can't encode character '\xbb' in position ...
- swift 4 生成随机数的内置方法汇总
第一种是drand48(),不接收参数, 返回的类型是Double. 就返回 0到1之间的Double类型的随机数.举个例子: //每次点击button,button 的颜色会随机变换. class ...
- 使用Promise发送多个异步请求, 全部完成后再执行
const datas = idList .map(id => url+'/id') .map(url => fetch(url).then(res => res.json())); ...
- Urban Elevations UVA - 221
题目大意:给出建筑的俯视图,以及每个建筑的左下角坐标,宽度,长度,高度.求正视图可观察到的建筑的编号 思路:建筑物的可见性等于南墙的可见性,依据左下角排序后,逐个判断每个建筑是否可见.对南墙的x坐标进 ...
- 分布式系列九: kafka
分布式系列九: kafka概念 官网上的介绍是kafka是apache的一种分布式流处理平台. 最初由Linkedin开发, 使用Scala编写. 具有高性能,高吞吐量的特定. 包含三个关键能力: 发 ...
- pythonのdjango 信号
一.内置信号 Django中提供了“信号调度”,用于在框架执行操作时解耦.通俗来讲,就是一些动作发生的时候,信号允许特定的发送者去提醒一些接受者. Model signals pre_init # d ...
- jQuery新版本没有了Toggle事件,两个按钮分别控制隐藏显示,同时这两个按钮点击也要互斥。
十二月没来得及整理发布,一直在草稿箱.现在已经2019年1月了... 需求大概是这样的 //XX点击事件 var flagBar = 0; $("#doNotBaseRate"). ...
- Maven - 镜像<mirror>
使用镜像如果你的地理位置附近有一个速度更快的central镜像,或者你想覆盖central仓库配置,或者你想为所有POM使用唯一的一个远程仓库(这个远程仓库代理的所有必要的其它仓库),你可以使用set ...
- python中的多线程和多进程编程
注意:多线程和多线程编程是不同的!!! 第一点:一个进程相当于一个要执行的程序,它会开启一个主线程,多线程的话就会再开启多个子线程:而多进程的话就是一个进程同时在多个核上进行: 第二点:多线程是一种并 ...
- input子系统学习笔记六 按键驱动实例分析下【转】
转自:http://blog.chinaunix.net/uid-20776117-id-3212095.html 本文接着input子系统学习笔记五 按键驱动实例分析上接续分析这个按键驱动实例! i ...