可加入C++ 也可自定义。
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"><CodeSnippet Format="1.0.0"><Header><Title>注释</Title><Shortcut>cannt</Shortcut><Description>文件统一注释</Description><Author>ly</Author><SnippetTypes><SnippetType>Expansion</SnippetType><SnippetType>SurroundsWith</SnippetType></SnippetTypes></Header><Snippet><Declarations><Literal><ID>fileName</ID><ToolTip>文件名</ToolTip><Default>xxxxxx</Default></Literal></Declarations><Code Language="cpp"><![CDATA[/*** @file $fileName$cpp* @author ly* @email Jones_Lee3@163.com* @version V4.01* @date 07-DEC-2017* @license GNU General Public License (GPL) * @brief Universal Synchronous/Asynchronous Receiver/Transmitter * @detail detail* @attention* This file is part of OST. \n * This program is free software; you can redistribute it and/or modify \n * it under the terms of the GNU General Public License version 3 as \n * published by the Free Software Foundation. \n * You should have received a copy of the GNU General Public License \n * along with OST. If not, see <http://www.gnu.org/licenses/>. \n * Unless required by applicable law or agreed to in writing, software \n* distributed under the License is distributed on an "AS IS" BASIS, \n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n* See the License for the specific language governing permissions and \n * limitations under the License. \n* \n* @htmlonly * <span style="font-weight: bold">History</span> * @endhtmlonly * Version|Auther|Date|Describe* ------|----|------|-------- * V3.3|Jones Lee|07-DEC-2017|Create File* <h2><center>©COPYRIGHT 2017 WELLCASA All Rights Reserved.</center></h2>*/ ]]></Code></Snippet></CodeSnippet>
</CodeSnippets>
命令 | 字段名 | 语法 |
---|---|---|
@file | 文件名 | file [< name >] |
@brief | 简介 | brief { brief description } |
@author | 作者 | author { list of authors } |
@mainpage | 主页信息 | mainpage [(title)] |
@date | 年-月-日 | date { date description } |
@author | 版本号 | version { version number } |
@copyright | 版权 | copyright { copyright description } |
@param | 参数 | param [(dir)] < parameter-name> { parameter description } |
@return | 返回 | return { description of the return value } |
@retval | 返回值 | retval { description } |
@bug | 漏洞 | bug { bug description } |
@details | 细节 | details { detailed description } |
@pre | 前提条件 | pre { description of the precondition } |
@see | 参考 | see { references } |
@link | 连接(与@see类库,{@link http://www.google.com}) | link < link-object> |
@throw | 异常描述 | throw < exception-object> { exception description } |
@todo | 待处理 | todo { paragraph describing what is to be done } |
@warning | 警告信息 | warning { warning message } |
@deprecated | 弃用说明。可用于描述替代方案,预期寿命等 | deprecated { description } |
@example | 示例。 | deprecated { description } |