我正在尝试生成一个 doxygen 文档,其中我有两个函数文档实例。一个描述从 .h 文件的函数头中提取的函数的用法(接口),另一个描述从 .c 文件中提取的函数的实现。我基本上想根据描述来自的文件(.h 或 .c)以两种不同的方式描述相同的功能。我认为这将有助于文档的可用性,因为如果您只关心如何使用这些功能,您可以轻松地忽略实现细节。我最好的尝试是尝试将 .h 和 .c 文件添加到这样的单独组中。
例子.h
/**
 * @defgroup exampleInterface Example Interface
 * @{
 */
/**
 * This is the header file so I describe how to use this function
 * @param arg
 * @returns something
 */   
 int someFunction(int arg);
/**
* @}
*/
例子.c
/**
 * @defgroup exampleImpl Example Implementation
 * @{
 */
/**
 * This is the .c file so I describe how this function is implemented.
 */   
 int someFunction(int arg)
 {
    ... Some code ...
 }
/**
 * @}
 */
结果是函数头描述仍然结合在一起。有没有办法在 doxygen 中做到这一点?也许我应该以另一种方式看待这个问题。
谢谢。