DEgITx
DEgITx

Reputation: 980

Force property type to doxygen

For example:

class Test
{
    /// This var contain Apple class
    void* something;
};

I know that "something" will be pointed to the object of Apple type. How can i force tell that to doxygen (for DOT graphs relations).

Upvotes: 2

Views: 206

Answers (3)

GManNickG
GManNickG

Reputation: 503863

Programming design aside, you can do this:

class Test
{
    #ifdef DOXYGEN_RUNNING
        Apple* something;
    #else
        void* something;
    #endif
};

And then have Doxygen predefine DOXYGEN_RUNNING. (Manual for preprocessing.)


(But seriously: if it's gonna be an Apple* just write it that way.)

Upvotes: 2

Mankarse
Mankarse

Reputation: 40603

It might be a bit heavy handed, but one way would be to conditionally declare it as an Apple* when processing it with doxygen:

class Test
{
    /// This var contain Apple class
#ifdef DOXYGEN_INVOKED
    Apple* something;
#else
    void* something;
#endif
};

You can configure Doxygen to define the DOXYGEN_INVOKED macro by using the PREDEFINED tag.

Upvotes: 2

Mark B
Mark B

Reputation: 96241

You tell this to Doxygen by declaring your pointer correctly as Apple* something.

Upvotes: 1

Related Questions