I have been trying to document my C++ project using Doxygen, with little success: Doxygen to fails recognize certain macros, and consequently entire functions are misinterpreted and most of time does not generate docs even though they have special comment blocks. Case in point:
/**
* \def __MYLIB_FUNCTION_ATTRIBUTE(...)
* \brief Some brief comment
* \details Detailed doc
* \sa Some valid references
*/
#define __MYLIB_FUNCTION_ATTRIBUTE(...) __attribute__(__VA_ARGS__)
/**
* \def IN
* \brief Tag for input arguments to a function
* \details Blah...
* \sa OUT
*/
#define IN
/**
* \def OUT
* \brief Tag for output arguments to a function
* \details Blah...
* \sa IN
*/
#define OUT
class MyClass {
public:
/**
* \fn MyClass()
* \brief Constructor for MyClass
* \details Hi!
*/
__MYLIB_FUNCTION_ATTRIBUTE(__always_inline__)
MyClass() {
}
/**
* \fn const char *doNothing(const char *s IN)
* \brief A weird function
* \details Some very weird doc
* \param[in] s No good parameter
*/
const char* __SXC_FUNCTION_ATTRIBUTE(__const__) doNothing(const char *s IN) {
return s;
}
};
Documentation generated for the above class is always missing a description for doNothing
and IN
is interpreted as a function! Am I doing something wrong here?