工程代码模板注释及C规范

2023-10-26


Doxygen全套工具下载

效果

.chm文件
在这里插入图片描述

网页效果
在这里插入图片描述

使用方法以IAR为例

此模板符合Doxygen的注释规范,可以直接生成API文档,目前多数厂家的API文档皆是使用此规范进行注释。

1、按照下图路径打开编辑模板
在这里插入图片描述
2、复制以下模板内容填入即可

################################################################################
##
## This is an example file for defining your own code templates.
##
## The syntax for defining a code template is:
## #TEMPLATE <template name>,<field>[=default value], <field>...
##
## The template name, the fields and their default values should be defined 
## within quotes if they contain non-alphanumeric characters.
## Use "&" in front of a letter in the template name to make the letter become 
## a shortcut, which means that you can use ALT+<letter> to select the template 
## or jump to the field in the dialog box.
## Use ">" in the template to organize the template names in submenus.
##
################################################################################
#TEMPLATE "&Statement>&if"
if( %c )
{
  
}
#TEMPLATE &Statement>&for,"&End Value"=10,&Variable=i
for(int %2 = 0; %2 < %1; ++%2)
{
  %c
}
#TEMPLATE &Corporate>&class,"Class &name",&Description=--,&Created="$DATE$, by $USER_NAME$"
//******************
// CLASS: %1
//
// DESCRIPTION:
//  %2
//
// CREATED: %3
//
// FILE: $FILE_FNAME$
//
class %1
{
public:
  %1();
  ~%1();
  %c
};
/******************************** End of file *********************************/

#TEMPLATE &DoxygenComment>&_C_file_comment,"Author name"=aron566,&Description=--,&Created="$DATE$, by $USER_NAME$",&Version=v1.0
/**
 *  @file $FILE_FNAME$
 *
 *  @date $DATE$
 *
 *  @author %1
 *
 *  @copyright Copyright (c) 2021 aron566 <aron566@163.com>.
 *
 *  @brief %2
 *
 *  @details None.
 *
 *  @version %4
 *
    @verbatim
    ==============================================================================
                      ##### How to use this driver #####
    ==============================================================================
      [..]
        The PCD HAL driver can be used as follows:
    
       (#) Declare a PCD_HandleTypeDef handle structure, for example:
           PCD_HandleTypeDef  hpcd;
    
       (#) Fill parameters of Init structure in HCD handle
    
       (#) Call HAL_PCD_Init() API to initialize the PCD peripheral (Core, Device core, ...)
    
       (#) Initialize the PCD low level resources through the HAL_PCD_MspInit() API:
           (##) Enable the PCD/USB Low Level interface clock using
                (+++) __HAL_RCC_USB_CLK_ENABLE(); For USB Device only FS peripheral
    
           (##) Initialize the related GPIO clocks
           (##) Configure PCD pin-out
           (##) Configure PCD NVIC interrupt
    
       (#)Associate the Upper USB device stack to the HAL PCD Driver:
           (##) hpcd.pData = pdev;
    
       (#)Enable PCD transmission and reception:
           (##) HAL_PCD_Start();
    
    @endverbatim
    ******************************************************************************
    * @attention
    *
    * <h2><center>&copy; Copyright (c) 2016 xxxco.Lto.
    * All rights reserved.</center></h2>
    *
    * This software component is licensed by xxx under BSD 3-Clause license,
    * the "License"; You may not use this file except in compliance with the
    * License. You may obtain a copy of the License at:
    *                        opensource.org/licenses/BSD-3-Clause
    *
    ******************************************************************************
 */
/** Includes -----------------------------------------------------------------*/
/* Private includes ----------------------------------------------------------*/
#include "$FILE_FNAME$%c"
/* Use C compiler ------------------------------------------------------------*/
#ifdef __cplusplus ///< use C compiler
extern "C" {
#endif
/** Private typedef ----------------------------------------------------------*/

/** Private macros -----------------------------------------------------------*/

/** Private constants --------------------------------------------------------*/
/** Public variables ---------------------------------------------------------*/
/** Private variables --------------------------------------------------------*/

/** Private function prototypes ----------------------------------------------*/
/** @defgroup $FILE_FNAME$_Private_Functions $FILE_FNAME$ Private Functions
  * @{
  */
static void $FILE_FNAME$();
/**
  * @}
  */
/** Private user code --------------------------------------------------------*/
/**
 * @defgroup modulename $FILE_FNAME$
 * @{
 */
static void xx(void);
/** @}*/

/** Private application code -------------------------------------------------*/
/*******************************************************************************
*
*       Static code
*
********************************************************************************
*/

/** Public application code --------------------------------------------------*/
/*******************************************************************************
*
*       Public code
*
********************************************************************************
*/
#ifdef __cplusplus ///<end extern c
}
#endif
/******************************** End of file *********************************/

#TEMPLATE &DoxygenComment>&_H_file_comment,"Author name"="Copyright (c) 2021 aron566 <aron566@163.com>.",&Description=--,&Created="$DATE$, by $USER_NAME$",&Version=v1.0
/**
 *  @file $FILE_FNAME$
 *
 *  @date $DATE$
 *
 *  @author %1
 *
 *  @brief %2
 *  
 *  @version %4
 */
#ifndef $FILE_FNAME$%c
#define $FILE_FNAME$
/** Includes -----------------------------------------------------------------*/
#include <stdint.h> /*need definition of uint8_t*/
#include <stddef.h> /*need definition of NULL*/
//#include <stdbool.h>/*need definition of BOOL*/
#include <stdio.h>  /*if need printf*/
#include <stdlib.h>
#include <string.h>
#include <limits.h>/**< if need INT_MAX*/
/** Private includes ---------------------------------------------------------*/

/* Use C compiler ------------------------------------------------------------*/
#ifdef __cplusplus ///< use C compiler
extern "C" {
#endif
/** Private defines ----------------------------------------------------------*/
/**
 * @name 分组说明文字
 * @{
 */
#define xxx "sss"
/** @}*/
/** Exported typedefines -----------------------------------------------------*/
/** 数据结构体*/
typedef struct xx
{
    xx; /**< 说明 */
}xxx_t;
/** Exported constants -------------------------------------------------------*/

/** Exported macros-----------------------------------------------------------*/
/** Exported variables -------------------------------------------------------*/
/** Exported functions prototypes --------------------------------------------*/

#ifdef __cplusplus ///<end extern c
}
#endif
#endif
/******************************** End of file *********************************/

#TEMPLATE &DoxygenComment>&_DefineGroup_comment,&GROUPNAME=组名,"Macro"=XX,&Value=--
/**
 * @name %1
 * @{
 */
#define %2          (%3U)
/** @}*/

#TEMPLATE &DoxygenComment>&_Struct_comment,&Brief=描述 ,&STRUCTNAME=结构名
/** 数据结构体*/
/** 
  * @brief  %1  
  */  
typedef struct %2
{
    xx; /**< 说明 */
}%2_t;

#TEMPLATE &DoxygenComment>&_DefineGroup_comment,&Brief=描述 ,&DefineName=宏名,&Value=值
/** 宏定义*/
/** @defgroup %1
  * @{
  */ 
#define %2      %3
/**
  * @}
  */
  
#TEMPLATE &DoxygenComment>&Small_FUNC_comment,"Author name"=aron566,&Brief=--,&Created="$DATE$",&Version=v1.0
/**
  ******************************************************************
  * @brief   %2
  * @param   [in]None
  * @return  TRUE  成功
  * @return  FALSE 失败
  * @author  %1
  * @version %4
  * @date    $DATE$
  ******************************************************************
  */
static void %c(void)
{
    return;
}
#TEMPLATE &DoxygenComment>&Small+_FUNC_comment,"Author name"=aron566,&Brief=--,&Created="$DATE$",&Version=v1.0,&note=None
/************************************************************
  * @brief   %2
  * @param   [in]None
  * @param   [out]None
  * @pre     前置条件
  * @return  返回写入值
  *- -1表示写入文件失败
  * @author  %1
  * @date    $DATE$
  * @version %4
  * @note    %5
  ***********************************************************/
static void %c(void)
{
    return;
}

#TEMPLATE &DoxygenComment>&FULL_FUNC_comment,"Author name"=aron566,&Brief=--,&Created="$DATE$",&Version=v1.0,&note=None
/************************************************************
  * @brief   %2
  * @param   [in]None
  * @param   [out]None
  * @pre     前置条件
  * @return  返回写入值
  *- -1表示写入文件失败
  * @par     示例:
  * @code
  //示例代码
  int a = getlen(xx);
  * @endcode
  * @author  %1
  * @date    $DATE$
  * @version %4
  * @note    %5
  ***********************************************************/
static void %c(void)
{
    return;
}

#TEMPLATE &DoxygenComment>&Deprecated_FUNC_comment,"Author name"=aron566,&Brief=--,&Created="$DATE$",&Version=v1.0,&note=None
/************************************************************
  * @brief   %2
  * @param   [in]None
  * @param   [out]None
  * @pre     前置条件
  * @return  返回写入值
  *- -1表示写入文件失败
  *-# 带序号说明
  * @see     参考函数::openfile
  * @author  %1
  * @date    $DATE$
  * @version %4
  * @note    %5
  * @deprecated 此函数将在未来版本中取消
  ***********************************************************/
static void %c(void)
{
    return;
}

## C文件注释
#TEMPLATE &DoxygenREF>&C_file_comment,"Author name"=aron566,&Description=None,&Created="$DATE$, by $USER_NAME$",&Version=v1.0
/**
 *  @file $FILE_FNAME$
 *
 *  @date $DATE$
 *
 *  @author %1
 *
 *  @copyright Copyright (c) 2021 aron566 <aron566@163.com>.
 *
 *  @brief %2
 *
 *  @details 使用该模块有哪些细节注意等
 *
 *  @version %4
 */
/** Includes -----------------------------------------------------------------*/
/* Private includes ----------------------------------------------------------*/
#include "$FILE_FNAME$%c"
/* Use C compiler ------------------------------------------------------------*/
#ifdef __cplusplus ///< use C compiler
extern "C" {
#endif
/** Private typedef ----------------------------------------------------------*/

/** Private macros -----------------------------------------------------------*/

/** Private constants --------------------------------------------------------*/
/** Public variables ---------------------------------------------------------*/
/** Private variables --------------------------------------------------------*/

/** Private function prototypes ----------------------------------------------*/

/** Private user code --------------------------------------------------------*/
/**
 * @defgroup modulename $FILE_FNAME$
 * @{
 */
static void xx(void);
/** @}*/

/** Private application code -------------------------------------------------*/
/*******************************************************************************
*
*       Static code
*
********************************************************************************
*/

/** Public application code --------------------------------------------------*/
/*******************************************************************************
*
*       Public code
*
********************************************************************************
*/
#ifdef __cplusplus ///<end extern c
}
#endif
/******************************** End of file *********************************/

## H文件注释
#TEMPLATE &DoxygenREF>&H_file_comment,"Author name"="Copyright (c) 2021 aron566 <aron566@163.com>.",&Description=None,&Created="$DATE$, by $USER_NAME$",&Version=v1.0
/**
 *  @file $FILE_FNAME$
 *
 *  @date $DATE$
 *
 *  @author %1
 *
 *  @brief %2
 *  
 *  @version %4
 */
#ifndef $FILE_FNAME$%c
#define $FILE_FNAME$
/** Includes -----------------------------------------------------------------*/
#include <stdint.h> /*need definition of uint8_t*/
#include <stddef.h> /*need definition of NULL*/
//#include <stdbool.h>/*need definition of BOOL*/
#include <stdio.h>  /*if need printf*/
#include <stdlib.h>
#include <string.h>
#include <limits.h>/**< if need INT_MAX*/
/** Private includes ---------------------------------------------------------*/

/* Use C compiler ------------------------------------------------------------*/
#ifdef __cplusplus ///< use C compiler
extern "C" {
#endif
/** Private defines ----------------------------------------------------------*/
/**
 * @name 分组说明文字
 * @{
 */
#define xxx "sss"
/** @}*/
/** Exported typedefines -----------------------------------------------------*/
/** 数据结构体*/
typedef struct xx
{
    xx; /**< 说明 */
}xxx_t;
/** Exported constants -------------------------------------------------------*/

/** Exported macros-----------------------------------------------------------*/
/** Exported variables -------------------------------------------------------*/
/** Exported functions prototypes --------------------------------------------*/

#ifdef __cplusplus ///<end extern c
}
#endif
#endif
/******************************** End of file *********************************/

## 函数注释
#TEMPLATE &DoxygenREF>&FUNC_comment,"FUNC name"=None,&Brief=None,&Details=None,&attention=None,&note=None
/**
  ******************************************************************
  * @fn %1
  * @brief %2
  * @details %3
  * @param[in] 参数名 参数注解
  * @param[out] 参数名 参数注解
  * @param[in, out] 参数名 参数注解
  * @return None (宏函数无返回值)
  * @return 对返回值的说明
  * @see 扇入:调用了该函数的上级函数(扇入高表示该函数复用性好)
  * @see 扇出:该函数里调用了哪些下级函数(扇出高表示该函数复杂度高)
  * @note %5
  * @attention %4
  * @par example:
  * @code
  //代码示例
  * @endcode
  ******************************************************************
  */
static%c void %1(void)
{
    return;
}

## 枚举注释
#TEMPLATE &DoxygenREF>&Enum_comment,"Enum name"=None,&Brief=None,&Details=None,&attention=None,&note=None
/**
  ******************************************************************
  * @enum %1
  * @brief %2
  * @details %3
  * @note %5
  * @attention %4
  ******************************************************************
  */
typedef enum %1
{
    %c
}%1TypeDef;

## 宏函数注释
#TEMPLATE &DoxygenREF>&Define_comment,"Define name"=None,&Brief=None,&Details=None,&attention=None,&note=None
/**
  ******************************************************************
  * @def %1
  * @brief %2
  * @details %3
  * @param[in] 参数名 参数注解
  * @param[out] 参数名 参数注解
  * @param[in, out] 参数名 参数注解
  * @return None (宏函数无返回值)
  * @see 扇入:调用了该函数的上级函数(扇入高表示该函数复用性好)
  * @see 扇出:该函数里调用了哪些下级函数(扇出高表示该函数复杂度高)
  * @note %5
  * @attention %4
  * @par example:
  * @code
  //代码示例
  * @endcode
  ******************************************************************
  */
#define %1

## 结构体注释
#TEMPLATE &DoxygenREF>&Struct_comment,"Struct name"=None,&Brief=None,&Details=None,&attention=None,&note=None
/**
  ******************************************************************
  * @struct %1
  * @brief %2
  * @details %3
  * @note %5
  * @attention %4
  ******************************************************************
  */
typedef struct %1
{
    %c
}%1TypeDef;

## 联合体注释
#TEMPLATE &DoxygenREF>&Union_comment,"Union name"=None,&Brief=None,&Details=None,&attention=None,&note=None
/**
  ******************************************************************
  * @union %1
  * @brief %2
  * @details %3
  * @note %5
  * @attention %4
  ******************************************************************
  */
typedef union %1
{
    %c
}%1TypeDef;

C代码规范

工程注释模板

  • keil下注意保留文件最后空行,否者编译出现警告
  • 语句完整性要求:
    • if语句需带有花括号完整包含条件语句
    • 不带参数的函数使用void说明禁止参数表为空
  • 同行注释使用: /**< 注释语句*/
  • 尽可能的使用/* 注释 */ 对执行逻辑的注释,而不是//
  • 空格要求:声明或者定义函数时,其括号内参数以 数据类型+空格+参数名+逗号+空格…

C文件模板

/**
 *  @file xxx.c
 *
 *  @date 2021-02-7
 *
 *  @author aron566
 *
 *  @copyright None.
 *
 *  @brief 
 *
 *  @details 1、
 *
 *  @version V1.0
 */
/** Includes -----------------------------------------------------------------*/
/* Private includes ----------------------------------------------------------*/
#include "xx.h"

/* Use C compiler ------------------------------------------------------------*/
#ifdef __cplusplus ///< use C compiler
extern "C" {
#endif
/** Private typedef ----------------------------------------------------------*/
/** Private macros -----------------------------------------------------------*/
/** Private constants --------------------------------------------------------*/
/** Public variables ---------------------------------------------------------*/
/** Private variables --------------------------------------------------------*/

/** Private function prototypes ----------------------------------------------*/

/** Private user code --------------------------------------------------------*/
/**
 * @defgroup modulename $FILE_FNAME$
 * @{
 */
static void xx(void);
/** @}*/

/** Private application code -------------------------------------------------*/
/*******************************************************************************
*
*       Static code
*
********************************************************************************
*/
/**
  ******************************************************************
  * @brief   
  * @param   [in]None
  * @return  TRUE  成功
  * @return  FALSE 失败
  * @author  aron566
  * @version V1.0
  * @date    2021-01-25
  ******************************************************************
  */
/** Public application code --------------------------------------------------*/
/*******************************************************************************
*
*       Public code
*
********************************************************************************
*/
#ifdef __cplusplus ///<end extern c
}
#endif
/******************************** End of file *********************************/

h文件模板

/**
 *  @file xxx.h
 *
 *  @date 2021-01-25
 *
 *  @author aron566
 *
 *  @brief 
 *  
 *  @version V1.0
 */
#ifndef $FILE_FNAME$%c
#define $FILE_FNAME$
/** Includes -----------------------------------------------------------------*/
#include <stdint.h> /**< need definition of uint8_t */
#include <stddef.h> /**< need definition of NULL    */
#include <stdbool.h>/**< need definition of BOOL    */
#include <stdio.h>  /**< if need printf             */
#include <stdlib.h>
#include <string.h>
#include <limits.h> /**< need variable max value    */
/** Private includes ---------------------------------------------------------*/

/* Use C compiler ------------------------------------------------------------*/
#ifdef __cplusplus ///< use C compiler
extern "C" {
#endif
/** Private defines ----------------------------------------------------------*/
/**
 * @name 分组说明文字
 * @{
 */
#define xxx "sss"
/** @}*/
/** Exported typedefines -----------------------------------------------------*/
/*枚举*/
typedef enum
{
    XXXXX = 0,
    
}XX_Typedef_t
    
/** 数据结构体*/
typedef struct
{
    xx; /**< 说明 */
}xxx_Typedef_t;

/** Exported constants -------------------------------------------------------*/

/** Exported macros-----------------------------------------------------------*/
/** Exported variables -------------------------------------------------------*/
/** Exported functions prototypes --------------------------------------------*/

#ifdef __cplusplus ///<end extern c
}
#endif
#endif
/******************************** End of file *********************************/

函数注释

/**
  ******************************************************************
  * @brief   %2
  * @param   [in]None
  * @return  TRUE  成功
  * @return  FALSE 失败
  * @author  aron566
  * @version v1.0
  * @date    2021-5-28
  ******************************************************************
  */
static void xxx(void)
{
    return;
}

函数或变量命名方式

  • 函数:大驼峰+下划线方式:void Get_Val(void) 在Linux中是以小写+下划线方式:void get_val(void);

  • 宏定义枚举:皆使用大写

  • 重命名: 大写字母_Typedef_t

文件编码

  • 编码是使用UTF-8编码无BOM

对齐方式

  • TAB键一般使用4空格缩进,但是设置2个空格感觉更好,按下两次tab

优化

  • 全局变量尽可能少,局部变量皆使用static关键字声明
  • 需对外的函数接口函数或者类型定义声明到头文件,否则应为对应c文件的私有
  • 传参,无需修改内容的指针传递需使用const声明如:void xx(const int *arry);
  • 返回,不可被外部修改的返回值需使用const声明如:const int *Get_Arry_Addr(void);
  • 类型转换,在不同的类型转换中使用显式的类型转换如:uint16_t ff = 11; int xx = (int)ff;
  • 宏定义,在定义数值时使用带U后缀显式说明这是无符号数,带有运算符的宏必需使用括号
  • 指针的操作,如在*p++语法中需使用括号明确指定语句优先级
  • 对于while(1)语句和for(;;)语句,优先使用for
  • 在基本数据类型中优先使用标准库中<stdint.h>中的数据类型,如:uint8_t int8_t uint16_t uint32_t,在uint64_t在32位和64位中长度不同,它会是平台支持的最大长度类型
  • 在字符串拷贝中优先使用带长度限定的接口,如strncpy显示指定最大拷贝长度
  • 在内存复制中优先使用memmove替代memcpy
  • 在堆内存申请中优先使用calloc替代malloc

防御性编程

在速度要求和代码精简要求不是太高的情况下应注重对参数的判断和临界值的限定。

  • 对入参的判断,防止访问无效内存区域
  • 对数组操作,防止越界访问
  • 声明局部变量定义明确初始化赋值
int exam_fun( unsigned char *str )   
{   
      if( str != NULL )     //  检查“假设指针不为空”这个条件 
	     {   
           //正常处理代码               
      } 
      else 
      {  
          //处理错误代码  
     }  
}

完成!

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

工程代码模板注释及C规范 的相关文章

  • 公司规定所有接口都用POST请求

    前言 经研发部商议 后续接口都统一使用post请求了 不过这个主要也和我们的具体业务有关 所有接口的参数都做了加 解密 加 验签处理 包括查询 下面是公司架构分享的一篇文章 觉得挺有意思 转载一下 转载内容 小二刚去一家公司实习俩月 就收到
  • 规范:前端代码开发规范

    一 前端静态代码检查工具 1 1 ESLint ESLint 是一个插件化的 JavaScript 代码检查工具 可以使用规则插件或者自定义规则对代码进行静态检查 1 2 JSLint JSLint 是由 Douglas Crockford
  • 软件版本命名规范

    1 版本命名规范 1 2 3 20190114 rc 由四部分组成 第一位 1 主版本号 当功能模块有较大的变动 比如增加多个模块或者整体架构发生变化 此版本号由项目决定是否修改 第二位 2 子版本号 当功能有一定的增加或变化 比如增加了对
  • 3个权威免费资源下载网站!

    hello大家好 这里是预计今天可以到家的老Y工作室 因为这几天在出差 也没花太多时间帮大家搜罗一些好玩有趣的网站 等回家后 会把补一些软件和教程 有朋友之前问老Y有没有免费的标准下载网站或者查询 于是老Y找了3个给有需要的朋友分享一下 0
  • UML类图小结

    类与类之间的关系 1 关联关系 关联 Association 关系是类与类之间最常用的一种关系 它是一种结构化关系 用于表示一类对象与另一类对象之间有联系 如汽车和轮胎 师傅和徒弟 班级和学生等等 图1 关联关系实例 1 双向关联 默认情况
  • Doxygen 并将属性值添加到输出文档

    服务栈使用 C 属性标记 Web 服务的剩余路径 例如 RestService hello1 RestService hello2 public class Hello 我想让 Doxygen 在 Hello 类的 doxygen 输出中包
  • 在 .NET 中使用 XML 注释有哪些优点?

    我无法理解使用 XML 注释的优点 我知道它们可以转换为代码外部的漂亮文档 但使用更简洁的 DOxygen 语法也可以实现同样的效果 我认为 XML 注释是错误的 因为 他们总体上混淆了注释和代码 它们更难被人类阅读 在单个屏幕上可以查看的
  • 为 swig 生成的包装 C++ 的 C# 生成 doxygen 注释

    我有一个用 C 编写的项目 我也使用 swig 生成一些 C 包装器 C 代码使用 Doxygen 样式注释来注释类和函数 是否可以让 Swig 获取这些 doxygen 注释并为 C 包装器类和函数生成 doxygen 注释 目前 SWI
  • Doxygen 分组

    我对 doxygen 中的页面和组有疑问 我有一个项目 我在其中使用 defgroup 和 ingroup cmd 对类等进行分组 到目前为止这工作正常 现在我想使用 Markdown 页面向项目添加特殊文档 这些页面应出现在专用模块 组
  • 在 Objective-C 中,什么实用程序在注释中使用 @brief 标签?

    我刚刚开始使用 Objective C 编程 发现了一些示例注释 如下所示 brief The UIImageView we use to display the image generated from the imageBuffer 目
  • Doxygen:使用 C++ 和 VHDL 进行项目的无缝文档

    我正在建立一个关于某种库的文档 该库由 C C 部分和 VHDL 部分以及一些仅包含 doxygen 的指导性页面组成 他们必须被放入一个独立的组中 到目前为止一切正常 漂亮又蓬松 但是如果我想通过使用优化 vhdl 子目录中的输出怎么办O
  • 如何避免 c++ 和 boost::python 文档之间的冗余?

    我使用 boost python 在 C 代码中添加 python 模块 C 项目使用 doxygen 进行记录 我想为 python 模块创建一个文档 但我不知道如何不像这样冗余 include
  • 我应该如何记录继承的成员? [关闭]

    Closed 这个问题是基于意见的 help closed questions 目前不接受答案 考虑一下我有一个复杂的类结构 其中许多元素继承自其他元素 我可能有一个方法GetStuff string stuffName int count
  • C 和 doxygen - 删除变量文档的重复项

    我正在使用 doxygen 记录我的 C 代码 为了更好的可读性 我将每个 c h 文件对 有时还有更多文件 的文档分组为defgroup and addtogroup see c 中的 doxygen 定义分组 https stackov
  • 如何创建指向同一文件的 Doxygen 链接

    我想编写一条 Doxygen 注释来命名出现注释的文件 我希望 Doxygen 为我提供文件名 而不是显式地编写文件名 因此 如果我更改文件的名称 或将某些内容移动到不同的文件中 我不需要更改名称的硬编码实例 举一个具体的例子 假设我要向
  • 如何在 Doxygen 注释中包含“<”?

    假设我正在使用 DOxygen Visual studio 兼容注释记录成员函数 如何使用小于 例如 如果我这样做
  • 如何排除私有标头出现在源浏览器中?

    我已经设定SOURCE BROWSER NO and VERBATIM HEADERS YES因为我希望客户端能够看到头文件 但是 我只想让他们看到某些标题 最好的方法是如何做到这一点 预先感谢您的任何帮助 EDIT 这似乎可行 但我对其他
  • 用于多语言 API 的 Doxygen

    我的公司开发了一个用于工程程序的 API 它是用 C 开发的 但我们为以下语言创建了包装器 类似于 VB 的专有语言 MATLAB 和Python 目前 文档是由一堆脚本生成的 要保持 100 的完整性开始变得非常耗时 我想知道是否有一种方
  • 在 C 中使用 Doxygen 记录变量

    Code include
  • 在 doxygen 中使用 SVG

    我正在尝试将 SVG 添加到我的 doxygen 文档中 第一次尝试是使用 image blabla svg 这有点工作 但是 SVG 包含另一个 png 参考 并且 内部 png 未显示 这在 Chrome 上有效 但即使在 Firefo

随机推荐

  • ad取消覆铜_【学院推荐】PCB工程师不得不看:超级实用AD常用快捷键总结

    快捷键的实用 极大的提高了大家工作中的效率 因此小编我特意帮大家搜集整理很多关于AD方面的常用快捷键 希望对大家有所帮助 一 PCB中常用快捷键 R L 输出PCB中所有网络的布线长度 Ctrl 左键点击 对正在布的线完成自动布线连接 M
  • python之word文档生成

    python之word文档生成 python docx官方文档 python docx操作word文档 python文件读取操作 excel文件操作 python docx官方文档 Document objects python docx
  • angular html原理,angular数据双向绑定的原理是什么?

    Angular是通过脏检测来进行双向数据绑定 所谓的双向绑定 无非是从界面的操作能实时反映到数据 数据的变更能实时展现到界面 angular数据双向绑定的原理 页面中每绑定一个数据或者事件时 就会向 watch队列中加入一条 watch 当
  • 几款Android 应用自动化测试工具

    简述 本文介绍几款流行的 Android应用自动化测试工具 Monkey测试 随机测试 压力测试 运行在模拟器或实际设备中 MonkeyRunner测试 操作简单 可录制测试脚本 可视化操作 主要生成坐标的自动化操作 移植性不强 Robot
  • keil编译问题error C100: unprintable character... 和WARNING L16: UNCALLED SEGMENT...

    keil编译出现问题如下 问题 error C100 unprintable character 0xA3 skipped 原因 keil里面出现了中文输入法时写的标点 程序中不能出现全角的任何字符 包括空格在内的任何标点符号和空格都只能在
  • ant design pro v5 - 03 动态菜单 动态路由(配置路由 动态登录路由 登录菜单)

    1 动态菜单 技术思路 配置路由 用户登录后根据用户信息获取后台菜单 2 动态路由 动态菜单 技术思路 使用umijs的运行时修改路由 patchRoutes routes UMIJS 参考文档 react umi 没有守护路由的功能 直接
  • 如何进行容器镜像加速?

    容器相比虚拟机最突出的特点之一便是轻量化和快速启动 相比虚拟机动辄十几个 G 的镜像 容器镜像只包含应用以及应用所需的依赖库 所以可以做到几百 M 甚至更少 但即便如此 几十秒的镜像拉取还是在所难免 如果镜像更大 则耗费时间更长 我们团队
  • python中MySQLdb的execute和executemany的使用

    如果使用executemany对数据进行批量插入的话 要注意一下事项 conn MySQLdb connect host localhost user root passwd password db myDB charset utf8 cu
  • UncaughtExceptionHandler

    61 常见的Exception Type 1 EXC BAD ACCESS 在开发过程中 总是会遇到各种Exception 在此总结一些常见的Exception NSInvalidArgumentException 错误类型 NSInval
  • C++ STL std::copy 详解

    如果要把一个序列 sequence 拷贝到一个容器 container 中去 通常用std copy算法 代码如下 std copy start end std back inserter container 这里 start和end是输入
  • C# 五步完成Bmp文件流到AVI的转换

    近日因项目需要 从Android客户端发送过来的图像流既要能实时显示在picturebox中 还要求能够转自动录制成AVI文件 网上查了不少关于C 屏幕录制的文章 什么directshow之类的 用C 倒是很方便 C 还是过于麻烦了点 对于
  • msconfig蓝屏_在msconfig里修改了处理器数和最大内存后电脑无法启动一直蓝屏

    楼主你 很有才 没事改那玩样 你以为4核心就 是4个处理器了 也 从没听说过 天冷了 启动会很慢www mh456 com防采集 win10 上面那个老兄2113 我代码没成功 5261情况基本符合就是没成 懵 然后我开4102机按esc选
  • 后端实战教程:如何使用 Node.js 开发 RESTful API 接口(Node.js + Express + Sequelize + MySQL)

    使用 Node js 开发 RESTful API 接口 后端部分 node js Express Sequelize MySQL 后端部分 node js Express MySQL 后端部分 后端 node js 项目结构 安装 nod
  • 60道逻辑推理题及答案

    作者 billy 版权声明 著作权归作者所有 商业转载请联系作者获得授权 非商业转载请注明出处 前言 程序员面试题中经常会出现一些烧脑的逻辑题 博主觉得这种题目非常有趣 于是收集了一些分享给大家 1 假设有一个池塘 里面有无穷多的水 现有2
  • 学完python基础知识之后可以做些什么-学完python后再学什么

    本文收集整理关于学完python后再学什么的相关议题 使用内容导航快速到达 内容导航 Q1 Python学完还需要学什么才可以开发真正的应用软件 你说的c c mfc的关系 并不完全需要向你所说的先后顺序去学 只是说c语言属于面向过程的语言
  • F1.52 视频编码简介

    视频编解码的应用技术很复杂 涉及到的技术主要包括I P B帧技术 运动估计和运动补偿等 视频压缩编码过程一般分3个步骤 包括时间维 空间维及熵编码 视频解码是编码的逆过程 首先是时间维压缩 主要以参考帧的数据预测当前帧的数据 输出预测向量和
  • QFontMetrics、QLabe::paintEvent() 实现label自适应 text宽度, 并添加下划线,Qlabel中 字符串宽度获取

    参考 实用QFontMetrics QLabe 中字符串宽度获取 每个字符的宽度 QFontMetrics fontMetrics this gt font 字符串总宽度 int textWidth fontMetrics width m
  • 结巴分词中TFIDF的原理

    之前了解TFIDF只是基于公式 今天被阿里面试官问住了 所以深入讨论下TFIDF在结巴分词中原理 概念 TF IDF term frequency inverse document frequency 是一种用于资讯检索与资讯探勘的常用加权
  • MFC-核心类库-CWnd的成员函数介绍(二)

    1 CWnd FromHandle CWnd在给定窗口句柄时 返回指向对象的指针 如果CWnd对象未附加到句柄 CWnd则会创建并附加临时对象 static CWnd PASCAL FromHandle HWND hWnd 2 CWnd A
  • 工程代码模板注释及C规范

    工程代码模板注释规范 效果 使用方法以IAR为例 C代码规范 工程注释模板 C文件模板 h文件模板 函数注释 函数或变量命名方式 文件编码 对齐方式 优化 防御性编程 完成 Doxygen全套工具下载 效果 chm文件 网页效果 使用方法以