如何使用 doxywizard 正确记录具有 return 类型结构的函数?
How do I document functions with return type of struct properly using doxywizard?
虽然我到处都找了我认为我可能会找到我的答案,但我一直无法弄清楚如何正确记录函数 "struct Entity * NewEntity()" 以便在 doxywizard 运行时显示它。
它一直告诉我:"warning: Member NewEntity() (function) of file entity.h is not documented."
然而,密码是:
/***********************************************************************************************//*
* @fn struct Entity* NewEntity()
*
* @brief Initialises single entity.
* @return null if it fails, else finds empty spot in entity manager to use to make a new entity
* @author br66
* @date 3/30/2017
**************************************************************************************************/
struct Entity* NewEntity()
{
int i;
for (i = 0; i < 255; i++)
{
if (_entityM[i].m_active == 0)
{
// clear that space, just in case there's anything left over from its last use
memset(&_entityM[i], 0, sizeof(struct Entity));
_entityM[i].m_active = 1;
// any entity defaults? stay tooooooned
_entity_max_recorded++;
return &_entityM[i];
}
}
return NULL;
}
阅读文档,它告诉我确保头文件被记录在案,但它没有改变任何东西,我仍然收到警告。
您有两个评论区。 /****...***/ /* @fn... */
doxygen没看第二条评论
doxygen 注释块应以额外的“*”开头 /** @fn... */
。
虽然我到处都找了我认为我可能会找到我的答案,但我一直无法弄清楚如何正确记录函数 "struct Entity * NewEntity()" 以便在 doxywizard 运行时显示它。
它一直告诉我:"warning: Member NewEntity() (function) of file entity.h is not documented."
然而,密码是:
/***********************************************************************************************//*
* @fn struct Entity* NewEntity()
*
* @brief Initialises single entity.
* @return null if it fails, else finds empty spot in entity manager to use to make a new entity
* @author br66
* @date 3/30/2017
**************************************************************************************************/
struct Entity* NewEntity()
{
int i;
for (i = 0; i < 255; i++)
{
if (_entityM[i].m_active == 0)
{
// clear that space, just in case there's anything left over from its last use
memset(&_entityM[i], 0, sizeof(struct Entity));
_entityM[i].m_active = 1;
// any entity defaults? stay tooooooned
_entity_max_recorded++;
return &_entityM[i];
}
}
return NULL;
}
阅读文档,它告诉我确保头文件被记录在案,但它没有改变任何东西,我仍然收到警告。
您有两个评论区。 /****...***/ /* @fn... */
doxygen没看第二条评论
doxygen 注释块应以额外的“*”开头 /** @fn... */
。