Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Doxygen to "link" to enum defintions?

Tags:

c++

enums

doxygen

I have the following code:

/// \file Doxygen_tests.h

/**
 *
 * \enum    Tick_Column_Type
 *
 * \brief   Values that represent Tick_Column_Type. 
**/

enum Tick_Column_Type {
    TC_OPEN,         ///< Opening price
    TC_HIGH,         ///< High price

    TC_MAX,          ///< Required as last enum marker.  
};

/**
 *
 * \struct  Tick_Data_Row
 *
 * \brief   Holder for one row or snapshot of tick data.
 *
**/

struct __declspec (dllexport) Tick_Data_Row {
    Tick_Data_Row ();                       ///< Constructor.  Sets all columns to NaN
    void        init ();                    ///< Helper function to reset everything to NaN
    double  m_cols[TC_MAX];                 ///< The data.  Indexed by Tick_Column_Type.
};

Everything seems to work fine (the enum ends up at file scope, but I have a \file, so it appears, along with the descriptions, correctly formatted.

What I want (and is not happening) is that I'd like the reference to Tick_Column_Type in the documentation for Tick_Data_Row::m_cols to link back to that document page. Doxygen usually seems to be quite smart at figuring out "aha, that's a name I know, I'll hot-link it", but it fails to do so in this case.

It does not matter if I move the enum inside the struct.

Any clues?

like image 646
Eric H. Avatar asked Feb 25 '10 15:02

Eric H.


1 Answers

From the docs (Automatic Link Generation): One needs to change from

///< The data.  Indexed by Tick_Column_Type.

to

///< The data.  Indexed by ::Tick_Column_Type.
like image 153
Eric H. Avatar answered Sep 19 '22 04:09

Eric H.