Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doxygen enum in namespace

i'm writing documentation oh this code:

    namespace A {

    enum ENUM 
    {
        /// \var step to frame
        ENUM_1  = 0,            //!< val1
        ENUM_1  = 1,            //!< val2
        ENUM_2 = 2          //!< val3
    };

}

in result, comments values of ENUM don't displayed.

When i remove the namespace, everything is good, but no now

like image 591
corbands Avatar asked May 30 '26 09:05

corbands


2 Answers

You have to use this format:

    namespace A {
            /*!
            *  \addtogroup A
            *  @{
            */

            /// step to frame
            enum ENUM 
            {
                    ENUM_1  = 0,            //!< val1
                    ENUM_1  = 1,            //!< val2
                    ENUM_2 = 2          //!< val3
            };

            /*! @} */

    }
like image 87
Marcus Avatar answered Jun 01 '26 00:06

Marcus


You are placing the enum document header in the from place, it should be directly above the enum definition:

/// \brief Step to frame
enum ENUM
{
    ...
};
like image 26
Some programmer dude Avatar answered Jun 01 '26 00:06

Some programmer dude



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!