Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Documenting callback typedefs in Doxygen

I have the following typedef:

typedef void( __cdecl *tCallback )( const char* Message );

How would I document that correctly using Doxygen?

I would like to to have the tCallback documented and the parameters expected documented.

A simple example:

/// \typedef test
typedef test bool

produces correct output in doxygen

//typedef tCallback
typedef void( __cdecl *tCallback )( const char* Message );

produces:

C:/test.cpp:2: warning: Found ';' while parsing initializer list! (doxygen could be confused by a macro call without semicolon)
C:/test.cpp:1: warning: member with no name found.

and

//typedef void( __cdecl *tCallback )
typedef void( __cdecl *tCallback )( const char* Message );

produces the same as the above.

like image 544
Gregor Brandt Avatar asked Jan 28 '11 18:01

Gregor Brandt


1 Answers

Add the following to your Doxyfile:

PREDEFINED = __cdecl=

This will cause Doxygen to ignore this identifier for purposes of documentation.

like image 103
Ben Voigt Avatar answered Nov 16 '22 02:11

Ben Voigt