如何注释头文件

How do I comment header files?

本文关键字:文件 注释 何注释      更新时间:2023-10-16
/* ----------------------------------------------------------
** functions used for converting between different data types
** ---------------------------------------------------------*/
#ifndef TYPECONVERTER_H_INCLUDED
#define TYPECONVERTER_H_INCLUDED

/**
    converts binary to decimal
    @return converted decimal number
*/
int toDecimal(bool binary[], int noOfNumbers);
/**
    converts decimal to binary and stores it in a given array
*/
void toBinary(int origin[], bool binary[], int noOfNumbers);
#endif // TYPECONVERTER_H_INCLUDED

我如何评论这个标题的作用,以便Doxygen理解它?现在它只是将顶部注释分配给第一个函数。

这就是它的样子

Doxygen有一个file命令,它将注释块标记为记录某个文件。当用作file filename.ext时,它会将其分配给文件filename.ext。正如file一样,它适用于发生它的文件。

例:

/**
 @file
 functions used for converting between different data types
*/