cstructdoxygendoxywizard

How do I document functions with return type of struct properly using doxywizard?


Although I have looked everywhere I think I possibly could to find my answer, I have not been able to figure out how to correctly document the function "struct Entity * NewEntity()" so that it appears documented when doxywizard runs.

It just keeps telling me: "warning: Member NewEntity() (function) of file entity.h is not documented."

Yet, the code is:

/***********************************************************************************************//*
* @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;
}

Reading the documentation, it tells me to make sure the header file is documented, but it has not changed anything and I still get that warning.


Solution

  • You have two comment blocks. /****...***/ /* @fn... */

    The second comment is not looked at by doxygen.

    A doxygen comment block should start with an extra '*' /** @fn... */ .