Documenting typedefs of callbacks in Doxygen

I have the following typedef:

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

How can I document correctly using Doxygen?

I would like the tCallback documentation to be documented and the expected parameters to be documented.

A simple example:

 /// \typedef test typedef test bool 

produces the correct output in doxygen

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

gives:

 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 above.

+7
source share
1 answer

Add the following to your Doxyfile:

 PREDEFINED = __cdecl= 

This will cause Doxygen to ignore this identifier for documentation.

+4
source

All Articles