### Doxygen


#### 安装chocolatey
管理员模式安装
https://chocolatey.org/install.ps1
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Win+R打开运行框，输入cmd后，按下Ctrl+Shift+Enter进入管理员模式，输入以下命令：
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

更改本地仓库
方法一：cmd.exe管理员模式下执行以下指令

setx ChocolateyInstall D:\Chocolatey /M

方法二：powershell.exe管理员模式下执行以下指令

& setx.exe ChocolateyInstall D:\Chocolatey /M

 

#### Doxygen安装操作
choco info doxygen
choco install doxygen.install


#### vscode 
vscode，在应用市场中搜索 doxygen

在文件的头部，输入 /**后，按回车。
在函数的头部，输入 /**后，按回车。



#### 设置vscode配置文件
选择安装扩展：  菜单中选doxygen **“扩展设置”**

```Json

    // The prefix that is used for each comment line except for first and last.
    "doxdocgen.c.commentPrefix": " * ",
    // Smart text snippet for factory methods/functions.
    "doxdocgen.c.factoryMethodText": "Create a {name} object",
    // The first line of the comment that gets generated. If empty it won't get generated at all.
    "doxdocgen.c.firstLine": "/**",
    // Smart text snippet for getters.
    "doxdocgen.c.getterText": "Get the {name} object",
    // The last line of the comment that gets generated. If empty it won't get generated at all.
    "doxdocgen.c.lastLine": " */",
    // Smart text snippet for setters.
    "doxdocgen.c.setterText": "Set the {name} object",
    // Doxygen comment trigger. This character sequence triggers generation of Doxygen comments.
    "doxdocgen.c.triggerSequence": "/**",
    // Smart text snippet for constructors.
    "doxdocgen.cpp.ctorText": "Construct a new {name} object",
    // Smart text snippet for destructors.
    "doxdocgen.cpp.dtorText": "Destroy the {name} object",
    // The template of the template parameter Doxygen line(s) that are generated. If empty it won't get generated at all.
    "doxdocgen.cpp.tparamTemplate": "@tparam {param} ",
    // File copyright documentation tag.  Array of strings will be converted to one line per element.  Can template {year}.
    "doxdocgen.file.copyrightTag": ["@copyright Copyright (c) {year} xxxxxxx公司"
    ],
    // Additional file documentation. One tag per line will be added. Can template `{year}`, `{date}`, `{author}`, `{email}` and `{file}`. You have to specify the prefix.
    "doxdocgen.file.customTag": [
        "@par 修改日志:",
        "<table>",
        "<tr><th>Date       <th>Version <th>Author  <th>Description",
        "<tr><td>{date} <td>v1.0     <td>chen     <td>内容",
        "</table>",
    ],
    // The order to use for the file comment. Values can be used multiple times. Valid values are shown in default setting.
    "doxdocgen.file.fileOrder": [//文件注释的组成及其排序
        "file",
        "author",
        "brief",
        "version",
        "date",
        "empty",//空行
        "copyright",//版权
        "empty",
        "custom",//自定义
    ],
    //下面是设置上面的具体信息
    // The template for the file parameter in Doxygen.
    "doxdocgen.file.fileTemplate": "@file {name}",
    // Version number for the file.
    "doxdocgen.file.versionTag": "@version 0.1",
    // Set the e-mail address of the author.  Replaces {email}.
    "doxdocgen.generic.authorEmail": "147507xxx@qq.com",//你的邮箱地址
    // Set the name of the author.  Replaces {author}.
    "doxdocgen.generic.authorName": "cl",
    // Set the style of the author tag and your name.  Can template {author} and {email}.
    "doxdocgen.generic.authorTag": "@author {author} ({email})",
    // If this is enabled a bool return value will be split into true and false return param.
    "doxdocgen.generic.boolReturnsTrueFalse": true,
    // The template of the brief Doxygen line that is generated. If empty it won't get generated at all.
    "doxdocgen.generic.briefTemplate": "@brief {text}",
    // The format to use for the date.
    "doxdocgen.generic.dateFormat": "YYYY-MM-DD",
    // The template for the date parameter in Doxygen.
    "doxdocgen.generic.dateTemplate": "@date {date}",
    // Decide if you want to get smart text for certain commands.
    "doxdocgen.generic.generateSmartText": true,
    // Whether include type information at return.
    "doxdocgen.generic.includeTypeAtReturn": true,
    // How many lines the plugin should look for to find the end of the declaration. 
    //Please be aware that setting this value too low could improve the speed of comment 
    //generation by a very slim margin but the plugin also may not correctly detect all 
    //declarations or definitions anymore.
    "doxdocgen.generic.linesToGet": 20,
    // The order to use for the comment generation. Values can be used multiple times. 
     //Valid values are shown in default setting.
    "doxdocgen.generic.order": [// 根据自动生成的注释模板（目前主要体现在函数注释上）
        "brief",
        "tparam",
        "param",
        "return",
        "custom",
    ],
    // Custom tags to be added to the generic order. One tag per line will be added. Can template `{year}`, `{date}`, `{author}`, `{email}` and `{file}`. You have to specify the prefix.
    "doxdocgen.generic.customTags": [
        "",
        "@details ",//对函数的特殊说明
    ],
    // The template of the param Doxygen line(s) that are generated. If empty it won't get generated at all.
    "doxdocgen.generic.paramTemplate": "@param{indent:0} [in] {param}{indent:4} ",
    // The template of the return Doxygen line that is generated. If empty it won't get generated at all.
    "doxdocgen.generic.returnTemplate": "@return {type} ",
    // Decide if the values put into {name} should be split according to their casing.
    "doxdocgen.generic.splitCasingSmartText": true,
    // Array of keywords that should be removed from the input prior to parsing.
    "doxdocgen.generic.filteredKeywords": [],
    // Substitute {author} with git config --get user.name.
    "doxdocgen.generic.useGitUserName": false,
    // Substitute {email} with git config --get user.email.
    "doxdocgen.generic.useGitUserEmail": false,
    "[cpp]": {
        "editor.defaultFormatter": "ms-vscode.cpptools"
    },
    "remote.SSH.remotePlatform": {
        "192.168.0.102": "linux",
        "192.168.0.104": "linux"
    },
    "editor.unicodeHighlight.allowedCharacters": {
        "设": true
    }
    // Provide intellisense and snippet for doxygen commands
    //"doxdocgen.generic.commandSuggestion": true
    // Add `\\` in doxygen command suggestion for better readbility (need to enable commandSuggestion)
    //"doxdocgen.generic.commandSuggestionAddPrefix": false
```


```Json
  // Doxygen documentation generator set
  // 文件注释：版权信息模板
  "doxdocgen.file.copyrightTag": [
      "@copyright Copyright (c) {year}  TEST"
  ],
  // 文件注释：自定义模块，这里我添加一个修改日志
  "doxdocgen.file.customTag": [
      "@par 修改日志:",
      "<table>",
      "<tr><th>Date       <th>Version <th>Author <th>Description",
      "<tr><td>{date} <td>2.0     <td>test     <td>内容",
      "</table>",
  ],
  // 文件注释的组成及其排序
  "doxdocgen.file.fileOrder": [
        "file",		// @file
        "brief",	// @brief 简介
        "author",	// 作者
        "version",	// 版本
        "date",		// 日期
        "empty",	// 空行
        "copyright",// 版权
        "empty",
        "custom"	// 自定义
    ],
    // 下面时设置上面标签tag的具体信息
  "doxdocgen.file.fileTemplate": "@file {name}",
  "doxdocgen.file.versionTag": "@version 2.0",
  "doxdocgen.generic.authorEmail": "test@test.com",
  "doxdocgen.generic.authorName": "test",
  "doxdocgen.generic.authorTag": "@author {author} ({email})",
    // 日期格式与模板
    "doxdocgen.generic.dateFormat": "YYYY-MM-DD",
    "doxdocgen.generic.dateTemplate": "@date {date}",
    // 根据自动生成的注释模板（目前主要体现在函数注释上）
  "doxdocgen.generic.order": [
      "brief",
      "tparam",
      "param",
      "return"
  ],
  "doxdocgen.generic.paramTemplate": "@param{indent:8}{param}{indent:25}My Param doc",
  "doxdocgen.generic.returnTemplate": "@return {type} ",
"doxdocgen.generic.splitCasingSmartText": true,
```




.gitmodules  有定义子模块
[submodule "library/esea_device"]
	path = library/esea_device
	url = https://gitlab.ms675.top/ChenJihang/device.git

在项目中添加子模块命令：
git submodule add [address]
git submodule add git://github.com/chneukirchen/rack.git rack

子项目一起clone下来
git clone --recursive [address]
子项目初始化：
git submodule update --init --recursive
子项目更新：
git submodule foreach --recursive git checkout master

git submodule foreach git pull

​git clone https://github.com/Cambricon/CNStream
cd CNStream
git submodule update --init