How to write class attributes using Doxygen?

I am trying to document class attributes using Doxygen. Protected attributes are currently displayed in the list at the top of the page for a particular class. I would like to tell them about this.

I tried to use @param [name] [description]both above the beginning of the class, and directly above the declaration of attributes. I even tried putting them in the dock for my constructor class, and it just broke it.

Is there something I'm just missing?

- Logan

+3
source share
2 answers

You should use <or comment right before the attribute:

class cMainData
{
    private $attr;  //!< This is my attribute

    //! This is another attribute
    private $otherAttr;
}

, @brief, @note , :

class cMainData
{
    private $attr;  //!<@brief This is my attribute.
                    //!< This is some additional info about this attribute.
}
+4

: Doxygen: - php? , , phpDoc.

+1

Source: https://habr.com/ru/post/1760616/


All Articles