I need to document a project with doxygen, but I also need to ignore some macros that I use to read in small sections of my code, for which it makes no sense to appear in the documentation.
here's a minimal example (I mostly use macros to index some C-style 2D or 3D arrays):
#include <cstring>
int main ()
{
double loc_arr[9][4][4];
memset (loc_arr, 0.0, 144 * sizeof (double));
#define BLOCK(i) (&(loc_arr[i][0][0]))
for (int ii = 0; ii < 9; ++ii)
{
memset (BLOCK(ii), double(ii), 16 * sizeof (double));
}
#undef BLOCK
return 1;
}
When I do this, with the following settings:
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
I get the following:
screenshot http://i39.tinypic.com/2rf583c.png
Please note that the only way to avoid macros that should be documented is to establish ENABLE_PREPROCESSING = NOwhat is a problem for me, as it also excludes the inclusion schedule at the top of the page.