如何评论头文件?

时间:2015-11-16 08:16:21

标签: c++ header-files doxygen

/* ----------------------------------------------------------
** 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了解它?现在它只是将最高评论分配给第一个函数。

This is what it looks like

1 个答案:

答案 0 :(得分:5)

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

示例:

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