RE: [Doxygen-users] MACRO Question
Brought to you by:
dimitri
From: Philippe L. <Ph...@gm...> - 2001-05-17 13:09:47
|
dav...@ca... wrote: >>> Hi, Is it possible to hide in the doxygen documentation the body of a C macro ? Example: I define the following macro: #define MAX(a, b) (((a)>(b))?(a):(b)) with the doxygen comment: /*! \def MAX(a,b) \brief A macro that returns the maximum of \a a and \a b. */ I would like to have the following result: Defines #define MAX(a, b) A macro that returns the maximum of a and b. More... <<< I found a solution, but it behaves rather strangely. The solution: You must use the \hideinitializer command. The bug (or strange behaviour): It doesn't work with \def. In other words, /*! \hideinitializer \def MAX(a,b) \brief A macro that returns the maximum of \a a and \a b. */ doesn't work, while /*! \hideinitializer \brief A macro that returns the maximum of \a a and \a b. */ works... Note that if you put the comment just before the macro, you don't need to put the \def. It is redundant and leads to risk of inconsistencies (often programmers change code, but forget to change comments). Another strange behaviour, but acceptable: #define MAX(a, b) (((a)>(b))?(a):(b)) produces a definition line with the value on the same line, while #define MAX(a, b) \ (((a)>(b))?(a):(b)) gives a definition, with the value in a grey box prefixed by "Value:". Regards. PS.: Dimitri, I have done a little error chase in the documentation, as promised for a long time. I have to do a last file, and I will send you the result. -- --._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.-- Philippe Lhoste (Paris -- France) Professional programmer and amateur artist http://jove.prohosting.com/~philho/ --´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`-- Sent through GMX FreeMail - http://www.gmx.net |